const treeRef = ref<InstanceType<typeof ElTree>>() as any;
// 一键展开和收起
const clickExpand = () => {
  Object.values(treeRef.value.store.nodesMap).forEach((v: any) => v.expand());
};
const clickCollapse = () => {
  Object.values(treeRef.value.store.nodesMap).forEach((v: any) => v.collapse());
};
Logo

前往低代码交流专区

更多推荐