feat: support customizing operation icons

This commit is contained in:
youxingzhi
2019-02-23 10:04:27 +08:00
parent 3dd6e31028
commit 136b33971c
5 changed files with 35 additions and 27 deletions

View File

@@ -10,10 +10,8 @@
*/
const TreeNode = function (data) {
const { id, isLeaf } = data
// this.name = name
this.id = (typeof id === 'undefined') ? new Date().valueOf() : id
this.parent = null
// this.pid = null
this.children = null
this.isLeaf = !!isLeaf
@@ -29,7 +27,7 @@ TreeNode.prototype.changeName = function (name) {
this.name = name
}
TreeNode.prototype.addChildren = function (children, isNew) {
TreeNode.prototype.addChildren = function (children) {
if (!this.children) {
this.children = []
}