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-44tRnyoF.js";import{t as D}from"./data-B6s_JPbS.js";import{P as v}from"./index-D55rh6hR.js";import{h as T,bj as K,r as R,a7 as $,a6 as L,J as b}from"./antd-vue-vendor-CahNzUUa.js";import{N as w,_ as P}from"./index-CLZzJyTP.js";import"./index-DvqyyN77.js";import"./bem-DT3DdmOs.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./props-CG-jAkbI.js";import"./index-DS3utcig.js";import"./index-BZbg0EjM.js";import"./index-CrdW4fN1.js";import"./useTimeout-KpZCXEcl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./useContextMenu-BGU2vdqV.js";import"./useContentHeight-DLfJuPsF.js";import"./useWindowSizeFn-D9PllI8g.js";import"./useContentViewHeight-BIb_dTbE.js";import"./usePageContext-FyDvfV_K.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};
