import{d as k,f as d,n as B,u as y,U as l,a2 as E,ad as A,af as n,k as e,G as _}from"./vue-vendor-CxLCUzY4.js";import{_ as h}from"./index-BKs2x_To.js";import{t as D}from"./data-B6s_JPbS.js";import{P as v}from"./index-DaObvZxT.js";import{h as T,bj as K,r as R,a7 as $,a6 as L,J as b}from"./antd-vue-vendor-CDWW6V_M.js";import{N as w,_ as P}from"./index-B_2CoVdl.js";import"./index-DAURrYyA.js";import"./bem-C6eT35UB.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./props-BLY2qIO5.js";import"./index-Dz2zbQB_.js";import"./index-exs4VcBw.js";import"./index-ByLO0zSl.js";import"./useTimeout-CB9F1PLu.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./useContextMenu-CSt5a1-F.js";import"./useContentHeight-BWLGvKEC.js";import"./useWindowSizeFn-C3WExEpc.js";import"./useContentViewHeight-DlpfApuB.js";import"./usePageContext-HMYqek-Q.js";import"./injectionKey-DPVn4AgL.js";const x=k({name:"system-testtree",components:{BasicTree:h,PageWrapper:v,Card:b,Row:L,Col:$,Spin:R},setup(){const t=d(null),r=d(null),C=d(null),c=d([]),i=d(!1);function F(a,p){}function u(){i.value=!0,setTimeout(()=>{c.value=T(D),i.value=!1,B(()=>{var a;(a=y(r))==null||a.expandAll(!0)})},2e3)}function o(){i.value=!0,setTimeout(()=>{c.value=T(D),i.value=!1},2e3)}const f=d([{title:"parent ",key:"0-0"}]);function m(a){return new Promise(p=>{if(w(a.children)&&a.children.length>0){p();return}setTimeout(()=>{const s=y(t);if(s){const g=[{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:g}),s.setExpandedKeys(K([a.eventKey,...s.getExpandedKeys()]))}p()},300)})}return{treeData:D,handleCheck:F,tree:f,onLoadData:m,asyncTreeRef:t,asyncExpandTreeRef:r,loadTreeRef:C,tree2:c,loadTreeData:u,treeLoading:i,loadTreeData2:o}}});function S(t,r,C,c,i,F){const u=l("BasicTree"),o=l("Col"),f=l("a-button"),m=l("Spin"),a=l("Card"),p=l("Row"),s=l("PageWrapper");return E(),A(s,{title:"Tree基础示例"},{default:n(()=>[e(p,{gutter:[16,16]},{default:n(()=>[e(o,{span:8},{default:n(()=>[e(u,{title:"基础示例，默认展开第一层",treeData:t.treeData,defaultExpandLevel:"1"},null,8,["treeData"])]),_:1}),e(o,{span:8},{default:n(()=>[e(u,{title:"可勾选，默认全部展开",treeData:t.treeData,checkable:!0,defaultExpandAll:"",onCheck:t.handleCheck},null,8,["treeData","onCheck"])]),_:1}),e(o,{span:8},{default:n(()=>[e(u,{title:"指定默认展开/勾选示例",treeData:t.treeData,checkable:!0,expandedKeys:["0-0"],checkedKeys:["0-0"]},null,8,["treeData"])]),_:1}),e(o,{span:8},{default:n(()=>[e(u,{title:"懒加载异步树",ref:"asyncTreeRef",treeData:t.tree,"load-data":t.onLoadData},null,8,["treeData","load-data"])]),_:1}),e(o,{span:8},{default:n(()=>[e(a,{title:"异步数据，默认展开"},{extra:n(()=>[e(f,{onClick:t.loadTreeData,loading:t.treeLoading},{default:n(()=>r[0]||(r[0]=[_("加载数据")])),_:1},8,["onClick","loading"])]),default:n(()=>[e(m,{spinning:t.treeLoading},{default:n(()=>[e(u,{ref:"asyncExpandTreeRef",treeData:t.tree2},null,8,["treeData"])]),_:1},8,["spinning"])]),_:1})]),_:1}),e(o,{span:8},{default:n(()=>[e(a,{title:"BasicTree内置加载"},{extra:n(()=>[e(f,{onClick:t.loadTreeData2,loading:t.treeLoading},{default:n(()=>r[1]||(r[1]=[_("请求数据")])),_:1},8,["onClick","loading"])]),default:n(()=>[e(u,{ref:"loadTreeRef",treeData:t.tree2,loading:t.treeLoading},null,8,["treeData","loading"])]),_:1})]),_:1})]),_:1})]),_:1})}const ue=P(x,[["render",S]]);export{ue as default};
