We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
tableAttrs里添加elementui table的row-key属性不生效
-
Steps to reproduce the behavior: elementui el-table文档:
支持树类型的数据的显示。当 row 中包含 children 字段时,被视为树形数据。渲染树形数据时,必须要指定 row-key。支持子节点数据异步加载。设置 Table 的 lazy 属性为 true 与加载函数 load 。通过指定 row 中的 hasChildren 字段来指定哪些行是包含子节点。children 与 hasChildren 都可以通过 tree-props 配置。
1, 在数据里带有children字段的情况下, 加入row-key设置:
// 模拟数据 onResponse: (result) => { const data = [{ id: 2, parentId: 0, nameStr: '111', childrenExist: true, children: [ { id: 3, parentId: 2, nameStr: '222', childrenExist: false, } ] }] return { data, total: 2 } }, tableAttrs: { 'row-key': 'id' },
2, 仍报错 Error: for nested data item, row-key is required.
Error: for nested data item, row-key is required.
支持elementui el-table原生的树功能
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
tableAttrs里添加elementui table的row-key属性不生效
Screenshots
-
To Reproduce
Steps to reproduce the behavior:
elementui el-table文档:
1, 在数据里带有children字段的情况下, 加入row-key设置:
2, 仍报错
Error: for nested data item, row-key is required.
Expected behavior
支持elementui el-table原生的树功能
environment information
The text was updated successfully, but these errors were encountered: