DictTag-e41ec8de.js 1.1 KB

1
  1. import{d as _,r as v,f as y,al as f,_ as m,__tla as d}from"./index-11e4820e.js";import{i as T}from"./color-6e929987.js";import{d as g,__tla as h}from"./dict-4072dcec.js";let i,C=Promise.all([(()=>{try{return d}catch{}})(),(()=>{try{return h}catch{}})()]).then(async()=>{i=m(_({name:"DictTag",props:{type:{type:String,required:!0},value:{type:[String,Number,Boolean],required:!0}},setup(e){const l=v(),p=()=>{var t,o,u,c,n;return e.type?e.value===void 0||e.value===null?null:(r=e.type,s=e.value.toString(),g(r).forEach(a=>{a.value===s&&(a.colorType+""!="primary"&&a.colorType+""!="default"||(a.colorType=""),l.value=a)}),y(f,{style:(t=l.value)!=null&&t.cssClass?"color: #fff":"",type:(o=l.value)==null?void 0:o.colorType,color:(u=l.value)!=null&&u.cssClass&&T((c=l.value)==null?void 0:c.cssClass)?(n=l.value)==null?void 0:n.cssClass:"",disableTransitions:!0},{default:()=>{var a;return[(a=l.value)==null?void 0:a.label]}})):null;var r,s};return()=>p()}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/components/DictTag/src/DictTag.vue"]])});export{i as _,C as __tla};