import{_ as T}from"./index.9d5559d9.js";import{t as C}from"./data.ec134722.js";import{P as k}from"./index.566277e5.js";import{aP as B,a as E,aI as A,r as p,aQ as u,o as v,aR as K,p as n,j as e,ab as g,af as R,k as _,dm as $,aZ as L,q as D}from"./index.0d073eaa.js";import{C as P}from"./index.abdcab42.js";import"./index.78efd931.js";/* empty css              */import{R as b,C as w}from"./index.1d29734e.js";import"./fromPairs.84aabb58.js";import"./index.e8b360cf.js";import"./eagerComputed.156e81ff.js";import"./useContextMenu.cd4142a5.js";import"./index.0fb15725.js";import"./get.49a42f2e.js";import"./index.e9a84cba.js";import"./index.0972fd96.js";import"./useSize.bb4e5ce5.js";import"./useWindowSizeFn.ef20ece8.js";import"./useContentViewHeight.01b9d1c6.js";import"./ArrowLeftOutlined.90d2e05e.js";import"./index.8680e4c4.js";import"./transButton.8c1b1a4f.js";import"./index.aa6b7013.js";import"./useRefs.e81831e2.js";import"./PlusOutlined.64d8e001.js";import"./Col.a2eadc78.js";import"./useFlexGapSupport.474c31b7.js";const x=E({components:{BasicTree:T,PageWrapper:k,Card:P,Row:b,Col:w,Spin:A},setup(){const t=p(null),d=p(null),F=p(null),c=p([]),l=p(!1);function h(a,i){console.log("onChecked",a,i)}function o(){l.value=!0,setTimeout(()=>{c.value=g(C),l.value=!1,R(()=>{var a;console.log(_(d)),(a=_(d))==null||a.expandAll(!0)})},2e3)}function r(){l.value=!0,setTimeout(()=>{c.value=g(C),l.value=!1},2e3)}const m=p([{title:"parent ",key:"0-0"}]);function f(a){return new Promise(i=>{if($(a.children)&&a.children.length>0){i();return}setTimeout(()=>{const s=_(t);if(s){const y=[{title:`Child Node ${a.eventKey}-0`,key:`${a.eventKey}-0`},{title:`Child Node ${a.eventKey}-1`,key:`${a.eventKey}-1`}];s.updateNodeByKey(a.eventKey,{children:y}),s.setExpandedKeys(L([a.eventKey,...s.getExpandedKeys()]))}i()},300)})}return{treeData:C,handleCheck:h,tree:m,onLoadData:f,asyncTreeRef:t,asyncExpandTreeRef:d,loadTreeRef:F,tree2:c,loadTreeData:o,treeLoading:l,loadTreeData2:r}}}),S=D(" 123123 "),W=D("\u52A0\u8F7D\u6570\u636E"),q=D("\u8BF7\u6C42\u6570\u636E");function V(t,d,F,c,l,h){const o=u("BasicTree"),r=u("Col"),m=u("a-button"),f=u("Spin"),a=u("Card"),i=u("Row"),s=u("PageWrapper");return v(),K(s,{title:"Tree\u57FA\u7840\u793A\u4F8B"},{default:n(()=>[e(i,{gutter:[16,16]},{default:n(()=>[e(r,{span:8},{default:n(()=>[e(o,{title:"\u57FA\u7840\u793A\u4F8B\uFF0C\u9ED8\u8BA4\u5C55\u5F00\u7B2C\u4E00\u5C42",treeData:t.treeData,defaultExpandLevel:"1"},{title:n(()=>[S]),_:1},8,["treeData"])]),_:1}),e(r,{span:8},{default:n(()=>[e(o,{title:"\u53EF\u52FE\u9009\uFF0C\u9ED8\u8BA4\u5168\u90E8\u5C55\u5F00",treeData:t.treeData,checkable:!0,defaultExpandAll:"",onCheck:t.handleCheck},null,8,["treeData","onCheck"])]),_:1}),e(r,{span:8},{default:n(()=>[e(o,{title:"\u6307\u5B9A\u9ED8\u8BA4\u5C55\u5F00/\u52FE\u9009\u793A\u4F8B",treeData:t.treeData,checkable:!0,expandedKeys:["0-0"],checkedKeys:["0-0"]},null,8,["treeData"])]),_:1}),e(r,{span:8},{default:n(()=>[e(o,{title:"\u61D2\u52A0\u8F7D\u5F02\u6B65\u6811",ref:"asyncTreeRef",treeData:t.tree,"load-data":t.onLoadData},null,8,["treeData","load-data"])]),_:1}),e(r,{span:8},{default:n(()=>[e(a,{title:"\u5F02\u6B65\u6570\u636E\uFF0C\u9ED8\u8BA4\u5C55\u5F00"},{extra:n(()=>[e(m,{onClick:t.loadTreeData,loading:t.treeLoading},{default:n(()=>[W]),_:1},8,["onClick","loading"])]),default:n(()=>[e(f,{spinning:t.treeLoading},{default:n(()=>[e(o,{ref:"asyncExpandTreeRef",treeData:t.tree2},null,8,["treeData"])]),_:1},8,["spinning"])]),_:1})]),_:1}),e(r,{span:8},{default:n(()=>[e(a,{title:"BasicTree\u5185\u7F6E\u52A0\u8F7D"},{extra:n(()=>[e(m,{onClick:t.loadTreeData2,loading:t.treeLoading},{default:n(()=>[q]),_:1},8,["onClick","loading"])]),default:n(()=>[e(o,{ref:"loadTreeRef",treeData:t.tree2,loading:t.treeLoading},null,8,["treeData","loading"])]),_:1})]),_:1})]),_:1})]),_:1})}var me=B(x,[["render",V]]);export{me as default};
