index.05f2b7dd.js 841 B

1
  1. import{A as S,G as k,$ as v,d as x,j as n,a$ as B,aX as P,M as T,N as h}from"./index.e6d6174e.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=x({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},d=()=>{var a;const{type:u,mark:m,plain:g,round:C,size:e,closeable:f}=o,t={mark:m,plain:g,round:C};e&&(t[e]=e);const b=f&&n(T,{name:"cross",class:[s("close"),P],onClick:c},null);return n("span",{style:i(),class:s([t,u])},[(a=l.default)==null?void 0:a.call(l),b])};return()=>n(B,{name:o.closeable?"van-fade":void 0},{default:()=>[o.show?d():null]})}});const N=h(w);export{N as T};