index-3ee0a851.js 841 B

1
  1. import{j as S,d as k,g as n,aA as v,v as B,n as I,aq as P,I as T,D as h}from"./index-e362c2e8.js";const[x,s]=S("tag"),y={size:String,mark:Boolean,show:B,type:I("default"),color:String,plain:Boolean,round:Boolean,textColor:String,closeable:Boolean};var w=k({name:x,props:y,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:g,plain:m,round:C,size:e,closeable:f}=o,t={mark:g,plain:m,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(v,{name:o.closeable?"van-fade":void 0},{default:()=>[o.show?d():null]})}});const _=h(w);export{_ as T};