mirror of
http://git.xinwangdao.com/cnnc-embedded-parts-detect/detect.git
synced 2025-06-24 13:34:13 +08:00
2 lines
2.0 KiB
JavaScript
2 lines
2.0 KiB
JavaScript
![]() |
var R=Object.defineProperty;var l=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var g=(s,r,e)=>r in s?R(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e,u=(s,r)=>{for(var e in r||(r={}))h.call(r,e)&&g(s,e,r[e]);if(l)for(var e of l(r))v.call(r,e)&&g(s,e,r[e]);return s};var y=(s,r)=>{var e={};for(var t in s)h.call(s,t)&&r.indexOf(t)<0&&(e[t]=s[t]);if(s!=null&&l)for(var t of l(s))r.indexOf(t)<0&&v.call(s,t)&&(e[t]=s[t]);return e};var w=(s,r,e)=>new Promise((t,c)=>{var p=a=>{try{n(e.next(a))}catch(m){c(m)}},f=a=>{try{n(e.throw(a))}catch(m){c(m)}},n=a=>a.done?t(a.value):Promise.resolve(a.value).then(p,f);n((e=e.apply(s,r)).next())});import{u as L,B as C}from"./useForm-da122ba5.js";import{f as I,b as O,u as P}from"./schema-472d781b.js";import{a as S,B as T}from"./index-82593f0d.js";import{d as U,f as B,c as V,u as i,Z as j,a4 as A,a5 as G,k as N,a9 as W}from"./vue-08ef39cb.js";import{_ as Z}from"./index.js";import"./antd-86d2ef3c.js";import"./index-3c4a1ed6.js";import"./useWindowSizeFn-46f0db92.js";import"./copyTextToClipboard-9a0fd4f0.js";const $=U({__name:"drawer",emits:["success","register"],setup(s,{emit:r}){const e=r,t=B(!0),c=B(),[p,{resetFields:f,setFieldsValue:n,validate:a}]=L({labelWidth:120,schemas:I,showActionButtonGroup:!1}),[m,{setDrawerProps:_,closeDrawer:D}]=S(o=>w(this,null,function*(){yield f(),_({confirmLoading:!1}),t.value=!!(o!=null&&o.isUpdate),c.value=o==null?void 0:o.record,i(t)&&(yield n(u({},o.record)))})),F=V(()=>i(t)?"编辑":"新增");function k(){return w(this,null,function*(){try{const o=yield a();_({confirmLoading:!0});const d=y(o,[]),x=i(t)?P:O,b=i(t)?Object.assign({},u(u({},i(c)),d)):u({},d);yield x(b),D(),e("success")}finally{_({confirmLoading:!1})}})}return(o,d)=>(j(),A(i(T),W(o.$attrs,{onRegister:i(m),showFooter:"",title:F.value,width:"600px",onOk:k}),{default:G(()=>[N(i(C),{onRegister:i(p)},null,8,["onRegister"])]),_:1},16,["onRegister","title"]))}});const ee=Z($,[["__scopeId","data-v-563cc66c"]]);export{ee as default};
|