diff --git a/README.md b/README.md index 5480f06..312b2c7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Vue Tree View Component - Support `Vue.js` 1.0+ + Support `Vue.js` 2.0+ ## Usage diff --git a/demo/demo-vue1.html b/demo/demo-vue1.html deleted file mode 100644 index c15181a..0000000 --- a/demo/demo-vue1.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - Vue Tree - - - - -
-

{{title}}

- -
- - - - - - \ No newline at end of file diff --git a/demo/demo-vue2.html b/demo/demo-vue2.html index 54e802b..9924610 100644 --- a/demo/demo-vue2.html +++ b/demo/demo-vue2.html @@ -12,7 +12,7 @@ - + diff --git a/demo/demo.js b/demo/demo.js index 7e6f31e..03dc7be 100644 --- a/demo/demo.js +++ b/demo/demo.js @@ -3,7 +3,7 @@ var addNode = function (node) { node.isOpen = true; node.children.push({ - name: 'child node', + name: 'child node ' + node.children.length, parent: node, isParent: true, children: [], @@ -16,7 +16,7 @@ title: 'Delete', icon: 'fa fa-trash', click: function (node) { - node.parent && node.parent.children.$remove(node); + node.parent.children.splice(node.parent.children.indexOf(node), 1); } } ] @@ -86,14 +86,14 @@ click: function (node) { node.isOpen = true; node.children.push({ - name: 'Level2 node', + name: 'Level2 node ' + node.children.length, parent: node, buttons: [ { title: 'Delete', icon: 'fa fa-trash', click: function (node) { - node.parent.children.$remove(node); + node.parent.children.splice(node.parent.children.indexOf(node), 1); } } ] diff --git a/src/tree.vue.js b/src/tree.vue.js index c3d6dca..a57d31e 100644 --- a/src/tree.vue.js +++ b/src/tree.vue.js @@ -8,7 +8,7 @@ '' + '' + '', props: {