var p=(i,s,o)=>new Promise((m,a)=>{var f=e=>{try{t(o.next(e))}catch(n){a(n)}},c=e=>{try{t(o.throw(e))}catch(n){a(n)}},t=e=>e.done?m(e.value):Promise.resolve(e.value).then(f,c);t((o=o.apply(i,s)).next())});import{d as k,r as v,K as w,j as r,o as x,h as C,w as l,b as V,e as d,k as g,E as B}from"./index-90c78f99.js";const $={class:"flex justify-center"},R=k({__name:"tag-dialog",props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close"],setup(i,{emit:s}){const o=i,m=v(),a=v({tagName:""}),f={tagName:[{required:!0,message:"请输入标签名称"}]},c=t=>p(this,null,function*(){t&&(yield t.validate(e=>p(this,null,function*(){e&&(B.success(`${o.data&&o.data.roleId?"编辑":"新增"}成功！`),s("close",!0))})))});return w(()=>o.visible,t=>{t&&(a.value={tagName:""})}),(t,e)=>{const n=r("el-input"),b=r("el-form-item"),N=r("el-form"),_=r("el-button"),y=r("el-dialog");return x(),C(y,{"model-value":i.visible,title:"新增标签",width:574,"destroy-on-close":"",onClose:e[3]||(e[3]=u=>s("close"))},{footer:l(()=>[V("div",$,[d(_,{type:"primary",onClick:e[1]||(e[1]=u=>c(m.value))},{default:l(()=>[g("确定")]),_:1}),d(_,{onClick:e[2]||(e[2]=u=>s("close"))},{default:l(()=>[g("取消")]),_:1})])]),default:l(()=>[d(N,{ref_key:"formRef",ref:m,"label-suffix":":",model:a.value,rules:f,"label-width":"90"},{default:l(()=>[d(b,{label:"标签名称",prop:"tagName"},{default:l(()=>[d(n,{modelValue:a.value.tagName,"onUpdate:modelValue":e[0]||(e[0]=u=>a.value.tagName=u),placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value"])}}});export{R as _};
