var b=Object.defineProperty,v=Object.defineProperties;var y=Object.getOwnPropertyDescriptors;var c=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var f=(o,t,r)=>t in o?b(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,_=(o,t)=>{for(var r in t||(t={}))C.call(t,r)&&f(o,r,t[r]);if(c)for(var r of c(t))k.call(t,r)&&f(o,r,t[r]);return o},h=(o,t)=>v(o,y(t));var n=(o,t,r)=>new Promise((s,l)=>{var p=e=>{try{a(r.next(e))}catch(i){l(i)}},d=e=>{try{a(r.throw(e))}catch(i){l(i)}},a=e=>e.done?s(e.value):Promise.resolve(e.value).then(p,d);a((r=r.apply(o,t)).next())});import{d as I,f as g,U as R,a2 as w,ad as S,af as x,k as T,u}from"./vue-vendor-CxLCUzY4.js";import{h as B}from"./index-CLZzJyTP.js";import{P as K}from"./index-D55rh6hR.js";import{u as L}from"./index-KOQNKxnC.js";import N from"./BasicTable-DUJWN3yz.js";import"./antd-vue-vendor-CahNzUUa.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./useContentHeight-DLfJuPsF.js";import"./useWindowSizeFn-D9PllI8g.js";import"./useContentViewHeight-BIb_dTbE.js";import"./usePageContext-FyDvfV_K.js";import"./injectionKey-DPVn4AgL.js";import"./componentMap-DpsJvoqz.js";import"./useFormItem-IOFWTdED.js";import"./index-XZKTTfG1.js";import"./BasicModal-B8XmAOm7.js";import"./ModalHeader-DIFQSP_0.js";import"./useTimeout-KpZCXEcl.js";import"./index-DvqyyN77.js";import"./index-DS3utcig.js";import"./index-BZbg0EjM.js";import"./index-CrdW4fN1.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./download-DopMSmFN.js";import"./base64Conver-24EVOS6V.js";import"./index-CDa2_aYE.js";import"./index-D0jTtUNS.js";import"./useCountdown-BpP55PQ2.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JSelectUser-CfAGgHjD.js";import"./props-BtZrRNiI.js";import"./JSelectBiz-CLnJTMe2.js";import"./JAddInput-B36c3B5x.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./index-C7yPiS0L.js";import"./index-44tRnyoF.js";import"./bem-DT3DdmOs.js";import"./props-CG-jAkbI.js";import"./useContextMenu-BGU2vdqV.js";import"./depart.api-DHG2p2Yd.js";import"./JImageUpload-BFwNYdm5.js";import"./JDictSelectTag-CfF54ALX.js";import"./JSelectDept-CaEHrQp6.js";import"./JPopup-BvqhHpPl.js";import"./JEllipsis-C_gT_vEQ.js";import"./JUpload-DgDEmizw.js";import"./index-Bn2zmO2L.js";import"./index-CEznvAVZ.js";import"./index-CfAukas3.js";import"./index-ByX9XNkE.js";import"./useForm-Dx3lJ3DG.js";import"./JAreaLinkage-M9TGy8nY.js";import"./JCodeEditor-CR57XeIe.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./EasyCronInput-CWOTSpxK.js";const P="/mock/api/asynTreeList",Vt=I({__name:"AsyncTreeTable",setup(o){const t=g(!1),r=g([]),[s,{setLoading:l}]=L({rowKey:"id",bordered:!0,canResize:!1,isTreeTable:!0,showIndexColumn:!0,columns:[{title:"名称",dataIndex:"name"},{title:"组件",dataIndex:"component"},{title:"排序",dataIndex:"orderNum"}]});function p(e){return n(this,null,function*(){t.value=!0;let i=yield B.get({url:P,params:e});return t.value=!1,i.map(m=>m.hasChildren?h(_({},m),{children:[]}):m)})}function d(){return n(this,null,function*(){r.value=yield p({id:"0"})})}d();function a(e,i){return n(this,null,function*(){e&&i.hasChildren&&i.children.length===0&&(i.children=yield p({id:i.id}))})}return(e,i)=>{const m=R("a-card");return w(),S(u(K),null,{default:x(()=>[T(m,{bordered:!1},{default:x(()=>[T(u(N),{loading:t.value,dataSource:r.value,onRegister:u(s),onExpand:a},null,8,["loading","dataSource","onRegister"])]),_:1})]),_:1})}}});export{Vt as default};
