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-Cy4uayzW.js";import{P as K}from"./index-CRgSyMPH.js";import{u as L}from"./index-gyz1IdHU.js";import N from"./BasicTable-CgafrQwz.js";import"./antd-vue-vendor-CahNzUUa.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./useContentHeight-XU-h1taH.js";import"./useWindowSizeFn-DDyhhqyw.js";import"./useContentViewHeight-Qm4QNm5l.js";import"./usePageContext-CXQdt-5h.js";import"./injectionKey-DPVn4AgL.js";import"./componentMap-0iK4HQBq.js";import"./useFormItem-IOFWTdED.js";import"./index-zKZnG1QC.js";import"./BasicModal-sKcs_9Ir.js";import"./ModalHeader-ByCVDoqO.js";import"./useTimeout-gJpgadD6.js";import"./index-Bdn0r8CG.js";import"./index-CYoRlduV.js";import"./index-DYB8Ashr.js";import"./index-CrdW4fN1.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./download-Bn4f3tzD.js";import"./base64Conver-24EVOS6V.js";import"./index-D6H6KsT6.js";import"./index-CLxBW_h0.js";import"./useCountdown-2P9HvnfJ.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JSelectUser-B98pRPrS.js";import"./props-CtlWAg-s.js";import"./JSelectBiz-vYDBA0SK.js";import"./JAddInput-DP4caUmw.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./index-tDBMxW9-.js";import"./index-CNQBnF3P.js";import"./bem-IZKqD41e.js";import"./props-CG-jAkbI.js";import"./useContextMenu-Q6J5bB_u.js";import"./depart.api-B8q8MC-j.js";import"./JImageUpload-C5OCTlCG.js";import"./JDictSelectTag-CalJXNVe.js";import"./JSelectDept-D-TUaHvK.js";import"./JPopup-CVHkQZFq.js";import"./JEllipsis-TuDc52fh.js";import"./JUpload-DSWoDwh2.js";import"./index-B4vNk56t.js";import"./index-Dc7Jr5-j.js";import"./index-Dm1rPBfc.js";import"./index-BN26Feep.js";import"./useForm-DfoT2G6J.js";import"./JAreaLinkage-CTMEfTuh.js";import"./JCodeEditor-U9QIstNN.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./EasyCronInput-CZdChTcP.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};
