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-CYriLmQo.js";import{P as K}from"./index-BxgvQLkr.js";import{u as L}from"./index-BN5Ac_IG.js";import N from"./BasicTable-DAfCfXmD.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./useContentHeight-DtBiGC0g.js";import"./useWindowSizeFn-BxrEMPtP.js";import"./useContentViewHeight-D71xl1HH.js";import"./usePageContext-CCgh0KDo.js";import"./injectionKey-DPVn4AgL.js";import"./componentMap-7D1QIeNI.js";import"./useFormItem-CWa0w7fA.js";import"./index-CF_FJn6P.js";import"./BasicModal-BBgVjypv.js";import"./ModalHeader-jGKMr-DQ.js";import"./useTimeout-DC8132dd.js";import"./index-CxQILSKV.js";import"./index-BRTtls-l.js";import"./index-DOuVMe-q.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./download-CkbK5et1.js";import"./base64Conver-24EVOS6V.js";import"./index-QMJkXEyl.js";import"./index-Bb_NRLur.js";import"./useCountdown-C3-PRPLY.js";import"./useFormItemSingle-DM34aWgK.js";import"./JSelectUser-nVFm3ao2.js";import"./props-DoGpHXAD.js";import"./JSelectBiz-BW6f3e--.js";import"./JAddInput-CXT54-j9.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./index-BTSd5ebC.js";import"./index-BTAl55Kt.js";import"./bem-2ra1afoV.js";import"./props-BLY2qIO5.js";import"./useContextMenu-DYyhcDf7.js";import"./depart.api-C9T5xfw6.js";import"./JDictSelectTag-Jqy9TBcS.js";import"./JSelectDept-DorRVguN.js";import"./JPopup-KP1kIsae.js";import"./JEllipsis-287cEHxd.js";import"./JUpload-pyrTRFCz.js";import"./index-Bx9Mnn3N.js";import"./index-B1-pj6uh.js";import"./index-isxCPgHp.js";import"./index-BkgeZpOO.js";import"./useForm-8o5KRzWo.js";import"./JAreaLinkage-DFTeDmm8.js";import"./JCodeEditor-_KZ8XnNK.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./EasyCronInput-XK54XB3r.js";const P="/mock/api/asynTreeList",Ut=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{Ut as default};
