Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tree树形组件children为空数组时仍可对树进行展开折叠 #4128

Closed
maddenBoy opened this issue Dec 2, 2022 · 2 comments · Fixed by #4176
Closed

tree树形组件children为空数组时仍可对树进行展开折叠 #4128

maddenBoy opened this issue Dec 2, 2022 · 2 comments · Fixed by #4176

Comments

@maddenBoy
Copy link

TuSimple/naive-ui version (版本)

2.34.2

Vue version (Vue 版本)

3.2.45

Browser and its version (浏览器及其版本)

Chrome(108.0.5359.71)

System and its version (系统及其版本)

window11

Node version (Node 版本)

Reappearance link (重现链接)

https://codesandbox.io/s/xwo7pz?file=/src/Demo.vue

Reappearance steps (重现步骤)

把树形组件data的children字段设置为空数组,仍可对树进行展开折叠

Expected results (期望的结果)

期望树形组件data的children字段设置为空数组时和设置为null时的表现效果一致

Actual results (实际的结果)

把树形组件data的children字段设置为空数组,仍可对树进行展开折叠

Remarks (补充说明)

image

@github-actions github-actions bot added the untriaged need to sort label Dec 2, 2022
@XieZongChen
Copy link
Collaborator

XieZongChen commented Dec 5, 2022

目前此行为符合预期,参考:#3783

@XieZongChen XieZongChen added consideration-needed and removed untriaged need to sort labels Dec 5, 2022
@laterdays
Copy link

大多数场景下,的确是靠children是否有数据来判断,是否有子级

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants