fes-design
fes-design copied to clipboard
Tree组件在手风琴模式(accordion)下展开有点问题
问题描述
1、设置为accordion模式时,展开问题如下:
2、查看源码,是这一段有问题
components/tree/useCurrentData.ts
const computeCurrentData = () => {
....
if (expandingNode.value) {
const node = expandingNode.value;
// 展开后
if (node.isExpanded.value) {
const index = currentData.value.indexOf(node.value);
addNode(node.children, index + 1);
} else {
const index = currentData.value.indexOf(node.value);
deleteNode(node.childrenPath, index + 1);
}
expandingNode.value = null;
return;
}
}
如何复现
复现过程看以上动图
代码
No response
预期结果
希望可以正常展开
环境描述/版本信息
OS: 10.13.6 Browser: chrome Node: v16
其它补充内容
No response