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
The default selection data of the tree under checkstrict is a one-dimensional array, but once clicked, it becomes a two-dimensional array of checked: and halfchecked #5395
Comments
Hello @yemaozi999. Please provide a online reproduction by forking this link for vue2、 link for vue3 or a minimal GitHub repository. Make sure to choose the correct version. 你好 @yemaozi999, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 for vue2、 此处 for vue3 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。请确保选择准确的版本。 |
不是二维数组。是类似这种: |
这样数据格式变化, 会出现处理的问题, 要写两种方法来区分 初始数据 和点击数据 const checkshow = (id:number)=>{ |
而且在checkStrictly 模式下, 无论怎么点 halfChecked 数组都不会有值 |
checkStrictly 下传单数组没来就是错误的,只是组件做了容错处理。 |
Since the issue was labeled with 由于该 issue 被标记为需要复现信息,却 7 天未收到回应。现关闭 issue,若有任何问题,可评论回复。 |
checkStrictly为false的情况下,onCheck回调没有返回halfChecked的值,只是返回checked值的数组,但组件当前的状态是父子节点选中状态存在关联。 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Version
3.1.0-rc.2
Environment
chrome
Reproduction link
[https://www.undefinded.com](https://codesandbox.io/s/f0w5es?file=/src/App.vue)
Steps to reproduce
checkStrictly 下的tree 默认选择数据是 一维数组[1,2,3], 但是一点击 就变成 checked:[1,2,3] 和 halfChecked:[] 的二维数组,
我一开始传 二维数组, 整个tree 都点不了了
What is expected?
传入的数据是一维, 点击后的动态数据 一维, 或者 传入的二维 点击也是二维
The incoming data is one-dimensional, the dynamic data after clicking is one-dimensional, or the incoming two-dimensional click is also two-dimensional
What is actually happening?
checkStrictly 下的tree 默认选择数据是 一维数组, 但是一点击 就变成 checked: 和 halfChecked 的二维数组,
我一开始传 二维数组, 整个tree 都点不了了
The default selection data of the tree under checkstrict is a one-dimensional array, but once clicked, it becomes a two-dimensional array of checked: and halfchecked,When I first passed the two-dimensional array, the whole tree couldn't be clicked
The text was updated successfully, but these errors were encountered: