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-B_2CoVdl.js";import{P as K}from"./index-DaObvZxT.js";import{u as L}from"./index-LwlFn7Y4.js";import N from"./BasicTable-Clbg3fHx.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./useContentHeight-BWLGvKEC.js";import"./useWindowSizeFn-C3WExEpc.js";import"./useContentViewHeight-DlpfApuB.js";import"./usePageContext-HMYqek-Q.js";import"./injectionKey-DPVn4AgL.js";import"./componentMap-CzCGDP7x.js";import"./useFormItem-CWa0w7fA.js";import"./index-D2AmS0aU.js";import"./BasicModal-D3g2CFhF.js";import"./ModalHeader-C-C0dUi_.js";import"./useTimeout-CB9F1PLu.js";import"./index-DAURrYyA.js";import"./index-Dz2zbQB_.js";import"./index-exs4VcBw.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./download-2tYEzlDW.js";import"./base64Conver-24EVOS6V.js";import"./index-Cgt544dC.js";import"./index-BZ9ST2iq.js";import"./useCountdown-ImUE7YaG.js";import"./useFormItemSingle-DM34aWgK.js";import"./JSelectUser-BQIJUcBR.js";import"./props-BCVPj-bG.js";import"./JSelectBiz-CJyWq5s2.js";import"./JAddInput-YFlAniYT.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./index-CkL00Q0a.js";import"./index-BKs2x_To.js";import"./bem-C6eT35UB.js";import"./props-BLY2qIO5.js";import"./useContextMenu-CSt5a1-F.js";import"./depart.api-0qTriT9h.js";import"./JDictSelectTag-CxpDdimB.js";import"./JSelectDept-wKz_Qtmc.js";import"./JPopup-BJBYqoWe.js";import"./JEllipsis-Cn7GCKHR.js";import"./JUpload-DzM-D4DX.js";import"./index-khU3p_On.js";import"./index-DPEnuI0R.js";import"./index-Cnb8BkwG.js";import"./index-ARbUvvsq.js";import"./useForm-CcjrODHR.js";import"./JAreaLinkage-CSgDAlrn.js";import"./JCodeEditor-esTLnfS3.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./EasyCronInput-DclSHT47.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};
