var B=Object.defineProperty;var p=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;var d=(t,r,e)=>r in t?B(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,f=(t,r)=>{for(var e in r||(r={}))D.call(r,e)&&d(t,e,r[e]);if(p)for(var e of p(r))b.call(r,e)&&d(t,e,r[e]);return t};var u=(t,r,e)=>new Promise((l,a)=>{var m=s=>{try{o(e.next(s))}catch(i){a(i)}},n=s=>{try{o(e.throw(s))}catch(i){a(i)}},o=s=>s.done?l(s.value):Promise.resolve(s.value).then(m,n);o((e=e.apply(t,r)).next())});import{d as F,f as I,u as w,e as T,U as g,a2 as y,ad as S,af as $,k,ag as v}from"./vue-vendor-CxLCUzY4.js";import"./index-BN26Feep.js";import{u as R,B as N}from"./index-CJ4Xt1FM.js";import{u as O,B as P}from"./useForm-DfoT2G6J.js";import{_ as V}from"./index-Cy4uayzW.js";const W=[{title:"名称",dataIndex:"testName",width:200},{title:"值",dataIndex:"testValue",width:180},{title:"创建时间",dataIndex:"createTime",width:180}],E=[{field:"testName",label:"名称",component:"Input",colProps:{span:8}}],x=[{field:"testName",label:"名称",required:!0,component:"Input"},{field:"testValue",label:"值",required:!0,component:"Input"},{label:" ",field:"menu",slot:"menu",component:"Input"}],C=F({name:"RoleDrawer",components:{BasicDrawer:N,BasicForm:P},emits:["success","register"],setup(t,{emit:r}){const e=I(!0),[l,{resetFields:a,setFieldsValue:m,validate:n}]=O({labelWidth:90,schemas:x,showActionButtonGroup:!1}),[o,{setDrawerProps:s,closeDrawer:i}]=R(c=>u(this,null,function*(){a(),s({confirmLoading:!1}),e.value=!!(c!=null&&c.isUpdate),w(e)&&m(f({},c.record))})),h=T(()=>w(e)?"编辑角色":"新增角色");function _(){return u(this,null,function*(){try{const c=yield n();s({confirmLoading:!0}),i(),r("success")}finally{s({confirmLoading:!1})}})}return{registerDrawer:o,registerForm:l,getTitle:h,handleSubmit:_}}});function L(t,r,e,l,a,m){const n=g("BasicForm"),o=g("BasicDrawer");return y(),S(o,v(t.$attrs,{onRegister:t.registerDrawer,showFooter:"",title:t.getTitle,width:"500px",onOk:t.handleSubmit}),{default:$(()=>[k(n,{onRegister:t.registerForm},null,8,["onRegister"])]),_:1},16,["onRegister","title","onOk"])}const U=V(C,[["render",L]]),H=Object.freeze(Object.defineProperty({__proto__:null,default:U},Symbol.toStringTag,{value:"Module"}));export{U as T,H as a,W as c,E as s};
