index.ab2541bb.js 842 B

1
  1. import{t as S,v as k,u as v,d as B,c as t,b9 as P,au as T,a5 as h,D as x}from"./index.5f7ffb46.js";const[y,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=B({name:y,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(h,{name:"cross",class:[s("close"),T],onClick:c},null);return t("span",{style:i(),class:s([n,d])},[(a=l.default)==null?void 0:a.call(l),b])};return()=>t(P,{name:o.closeable?"van-fade":void 0},{default:()=>[o.show?u():null]})}});const p=x(w);export{p as T};