mental-health-web/manage/assets/index-89dbf370.js

2 lines
1.6 KiB
JavaScript
Raw Normal View History

2024-04-28 03:14:54 +00:00
import{d as x,c5 as y,O as c,o as r,c as t,Y as u,Z as b,e as d,$ as _,K as f,q as C,m as k,y as v,x as g,I as A}from"./index-ce293e15.js";import"./el-tag-3fc9a3c5.js";import{b as E}from"./el-select-73eaf91b.js";const V=["index"],w=x({__name:"index",props:{options:{type:Array,default:null},value:[Number,String,Array],showValue:y.bool.def(!0),separator:y.string.def(",")},setup(o){const e=o,p=c(()=>e.value===""||e.value===null||typeof e.value>"u"?[]:Array.isArray(e.value)?e.value.map(l=>""+l):String(e.value).split(e.separator)),T=c(()=>{var l;return((l=e.options)==null?void 0:l.length)==0||e.value===""||e.value===null||typeof e.value>"u"||p.value.forEach(n=>{if(!e.options.some(s=>s.value===n))return!0}),!1}),h=c(()=>{const l=[];return e.value!==""&&e.value!==null&&typeof e.value<"u"&&p.value.forEach(n=>{e.options.some(s=>s.value===n)||l.push(n)}),m(l)}),m=l=>l.length===0?"":l.reduce((n,s)=>n+" "+s);return(l,n)=>{const s=E;return r(),t("div",null,[(r(!0),t(u,null,b(o.options,(a,i)=>(r(),t(u,null,[d(p).includes(a.value)?(r(),t(u,{key:0},[(a.elTagType==="default"||a.elTagType==="")&&(a.elTagClass===""||a.elTagClass==null)?(r(),t("span",{key:a.value,index:i,class:_(a.elTagClass)},f(a.label+" "),11,V)):(r(),C(s,{"disable-transitions":!0,key:a.value+"",index:i,type:a.elTagType==="primary"||a.elTagType==="default"?"":a.elTagType,class:_(a.elTagClass)},{default:k(()=>[v(f(a.label+" "),1)]),_:2},1032,["index","type","class"]))],64)):g("",!0)],64))),256)),d(T)&&o.showValue?(r(),t(u,{key:0},[v(f(d(h)),1)],64)):g("",!0)])}}});const I=A(w,[["__scopeId","data-v-0ab84636"]]);export{I as _};