import{a5 as f}from"./index.17037962789732.js";import"./index.170379627897316.js";import"./index.170379627897317.js";import{n as v}from"./template.1703796278973.js";import{d as _,k as u,m as r,o as g,c as y,u as i,M as h}from"./vue.1703796278973.js";const w=_({__name:"Tag",props:{notify:{type:Object,default:()=>{}},value:{type:String,default:""}},emits:["update:value","change"],setup(c,{emit:n}){const o=c,l=u([]),t=u(void 0),p=async a=>{const e=await v.getTags(a);e.status===200&&(l.value=e.result.map(s=>({value:s.id,label:s.name})))};r(()=>o.value,a=>{t.value=a||void 0},{immediate:!0}),r(()=>o.notify.notifierId,a=>{a&&p(a)},{deep:!0,immediate:!0});const m=(a,e)=>{n("update:value",{source:"fixed",value:a}),n("change",e?e==null?void 0:e.label:"")};return(a,e)=>{const s=f;return g(),y(s,{style:{width:"100%"},value:i(t),"onUpdate:value":e[0]||(e[0]=d=>h(t)?t.value=d:null),placeholder:"请选择标签",options:i(l),onChange:m},null,8,["value","options"])}}});export{w as _};
