美文网首页
element table lazy 树状够,新增,删除、编辑后

element table lazy 树状够,新增,删除、编辑后

作者: 冰落寞成 | 来源:发表于2023-03-18 14:48 被阅读0次

使用element 自身函数

 this.$set(this.$refs.tableRef.store.states.lazyTreeNodeMap, id, data)

注意:

id 需要和 row-key保持一致
如:

row-key="dept_id"

<el-table
        class="custom-table"
        ref="tableRef"
        :data="agencyList"
        row-key="dept_id"
        lazy
        :load="onLoadChildren"
        :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
const store = this.$refs.tableRef.store
this.$set(store.states.lazyTreeNodeMap, res.dept_id, ress)

相关文章

网友评论

      本文标题:element table lazy 树状够,新增,删除、编辑后

      本文链接:https://www.haomeiwen.com/subject/rhnsrdtx.html