Ben Lin
2024-04-25 e404c076586d9682c3d782a4ecb0dc254f0bfd48
1
var u=(d,i,o)=>new Promise((e,s)=>{var c=a=>{try{t(o.next(a))}catch(n){s(n)}},l=a=>{try{t(o.throw(a))}catch(n){s(n)}},t=a=>a.done?e(a.value):Promise.resolve(a.value).then(c,l);t((o=o.apply(d,i)).next())});import{c as I}from"./index-e56657d6.js";import{u as g}from"./useFormDesignState-d63671ed.js";import{I as k,_ as b,__tla as D}from"./index-f0df2f76.js";import{d as O,e as j,a7 as x,_ as B,$ as N,a3 as h,f as y,a0 as f,B as C}from"./vue-1631514e.js";import"./antd-057b41b1.js";let _,S=Promise.all([(()=>{try{return D}catch(d){}})()]).then(()=>u(void 0,null,function*(){const d=O({name:"FormNodeOperate",components:{Icon:k},props:{schema:{type:Object,default:()=>({})},currentItem:{type:Object,default:()=>({})}},setup(e){const{formConfig:s,formDesignMethods:c}=g();return{activeClass:j(()=>e.schema.key===e.currentItem.key?"active":"unactivated"),handleDelete:()=>{const l=t=>{t.some((a,n)=>{var p;const{component:r,key:v}=a;if(["Grid","Tabs"].includes(r)&&((p=a.columns)==null||p.forEach(m=>l(m.children))),v===e.currentItem.key){let m=t.length===1?{component:""}:t.length-1>n?t[n+1]:t[n-1];return c.handleSetSelectItem(m),I(t,n),!0}})};l(s.value.schemas)},handleCopy:()=>{c.handleCopy()}}}}),i={class:"copy-delete-box"};function o(e,s,c,l,t,a){const n=x("Icon");return B(),N("div",i,[h("a",{class:f(["copy",e.activeClass]),onClick:s[0]||(s[0]=C((...r)=>e.handleCopy&&e.handleCopy(...r),["stop"]))},[y(n,{icon:"ant-design:copy-outlined"})],2),h("a",{class:f(["delete",e.activeClass]),onClick:s[1]||(s[1]=C((...r)=>e.handleDelete&&e.handleDelete(...r),["stop"]))},[y(n,{icon:"ant-design:delete-outlined"})],2)])}_=b(d,[["render",o]])}));export{S as __tla,_ as default};