releases 4.1.16

This commit is contained in:
xuliangzhan
2021-12-03 21:11:06 +08:00
parent 4e9553df35
commit 178ab2e8b1
3 changed files with 6 additions and 4 deletions

View File

@@ -20,8 +20,9 @@
resizable
ref="xTree"
row-id="id"
:tree-config="{transform: true, rowField: 'id', parentField: 'parentId', lazy: true, hasChild: 'hasChild', loadMethod: loadChildrenMethod}"
:tree-config="{lazy: true, hasChild: 'hasChild', loadMethod: loadChildrenMethod}"
:data="demo1.tableData">
<vxe-column type="seq" width="60"></vxe-column>
<vxe-column field="name" title="Name" width="400" tree-node></vxe-column>
<vxe-column field="size" title="Size"></vxe-column>
<vxe-column field="type" title="Type"></vxe-column>

View File

@@ -1,6 +1,6 @@
{
"name": "vxe-table",
"version": "4.1.15",
"version": "4.1.16",
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、贼灵活的配置项、扩展接口等...",
"scripts": {
"serve": "vue-cli-service serve",

View File

@@ -1155,7 +1155,7 @@ export default defineComponent({
fullAllDataRowIdData[rowid] = rest
fullDataRowIdData[rowid] = rest
}
}, { children: treeOpts.mapChildren })
}, { children: treeOpts.transform ? treeOpts.mapChildren : treeOpts.children })
} else {
afterFullData.forEach((row, index) => {
const rowid = getRowid($xetable, row)
@@ -2482,7 +2482,7 @@ export default defineComponent({
}
XEUtils.eachTree(rows, (childRow, index, items, path, parent, nodes) => {
const rowid = getRowid($xetable, childRow)
const rest = { row: childRow, rowid, seq: -1, index: -1, _index: -1, $index: -1, items, parent, level: parentLevel + nodes.length }
const rest = { row: childRow, rowid, seq: -1, index, _index: -1, $index: -1, items, parent, level: parentLevel + nodes.length }
fullDataRowIdData[rowid] = rest
fullAllDataRowIdData[rowid] = rest
}, treeOpts)
@@ -2490,6 +2490,7 @@ export default defineComponent({
if (transform) {
row[mapChildren] = rows
}
updateAfterDataIndex()
return rows
})
},