mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 10:33:50 +08:00
chore(demo->BasicTree): 增加获取当前tree数据示例. resolve #3253
This commit is contained in:
parent
748b99b18f
commit
90b45b3a51
@ -14,7 +14,7 @@
|
||||
<a-button @click="handleSetSelectData" class="mr-2"> 设置选中数据 </a-button>
|
||||
<a-button @click="handleGetSelectData" class="mr-2"> 获取选中数据 </a-button>
|
||||
<a-button @click="handleGetSelectNode" class="mr-2"> 获取选中节点 </a-button>
|
||||
|
||||
<a-button @click="handleGetTreeData" class="mr-2"> 获取Tree数据 </a-button>
|
||||
<a-button @click="handleSetExpandData" class="mr-2"> 设置展开数据 </a-button>
|
||||
<a-button @click="handleGetExpandData" class="mr-2"> 获取展开数据 </a-button>
|
||||
</div>
|
||||
@ -118,6 +118,11 @@
|
||||
});
|
||||
}
|
||||
|
||||
function handleGetTreeData() {
|
||||
const treeDataRef = getTree().getTreeData();
|
||||
createMessage.success(JSON.stringify(treeDataRef.value));
|
||||
}
|
||||
|
||||
return {
|
||||
treeData,
|
||||
treeRef,
|
||||
@ -134,6 +139,7 @@
|
||||
updateNodeByKey,
|
||||
checkAll,
|
||||
expandAll,
|
||||
handleGetTreeData,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user