1 |
- import{t as S,v as k,u as v,d as y,c as t,b2 as B,ay as P,a5 as T,D as h}from"./index.ffe80dbe.js";const[x,s]=S("tag"),I={size:String,mark:Boolean,show:k,type:v("default"),color:String,plain:Boolean,round:Boolean,textColor:String,closeable:Boolean};var w=y({name:x,props:I,emits:["close"],setup(o,{slots:l,emit:r}){const c=a=>{a.stopPropagation(),r("close",a)},i=()=>o.plain?{color:o.textColor||o.color,borderColor:o.color}:{color:o.textColor,background:o.color},u=()=>{var a;const{type:d,mark:m,plain:g,round:C,size:e,closeable:f}=o,n={mark:m,plain:g,round:C};e&&(n[e]=e);const b=f&&t(T,{name:"cross",class:[s("close"),P],onClick:c},null);return t("span",{style:i(),class:s([n,d])},[(a=l.default)==null?void 0:a.call(l),b])};return()=>t(B,{name:o.closeable?"van-fade":void 0},{default:()=>[o.show?u():null]})}});const p=h(w);export{p as T};
|