默认展开节点属性 : default-expand-all
本地有完整的树形结构数据,成为展开节点条件,数据里面有:children
懒加载模式,数据里面有: hasChildren: true
这两个属性还可以通过 tree-props 属性自定义:
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
默认展开节点属性 : default-expand-all
本地有完整的树形结构数据,成为展开节点条件,数据里面有:children
懒加载模式,数据里面有: hasChildren: true
这两个属性还可以通过 tree-props 属性自定义:
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
在写新增编辑页面的时候,有些情况需要把页面的data全部初始化还原到新增的时候,
Object.assign(this.$data, this.$options.data());