Update readme.md

This commit is contained in:
ayou
2018-03-07 21:39:46 +08:00
committed by GitHub
parent fc5b9f58ff
commit 2f1205ae02

View File

@@ -26,7 +26,7 @@ export default {
isMobile: isMobile(), isMobile: isMobile(),
record: null, record: null,
newTree: {}, newTree: {},
data: new VueTreeList.Tree([ data: new Tree([
{ {
name: 'Node 1', name: 'Node 1',
id: 1, id: 1,
@@ -56,12 +56,8 @@ export default {
} }
}, },
methods: { methods: {
getTreeChange: function () {
this.record = Object.assign({}, VueTreeList.Record)
},
addNode: function () { addNode: function () {
var node = new VueTreeList.TreeNode({ name: 'new node', isLeaf: false }) var node = new TreeNode({ name: 'new node', isLeaf: false })
if (!this.data.children) this.data.children = [] if (!this.data.children) this.data.children = []
this.data.addChildren(node) this.data.addChildren(node)
}, },