-
Notifications
You must be signed in to change notification settings - Fork 81
/
index.js
26 lines (25 loc) · 948 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import Vue from 'vue';
import TreeView from './src/TreeView.vue';
new Vue({ // eslint-disable-line no-new
el: '#container',
components: {
TreeView
},
data() {
return {
sampleJSON: { testArray: ['Just a Test String', 'in a Test Array', 0, 1, true, false], component: 'vuejsontreeview', descripton: 'A JSON Tree View built in Vue.js', tags: [{ name: 'vue.js' }, { name: 'JSON' }], steps: ['HTML Template', 'Root Component', 'View Component', { 'Transformation Logic': ['Transform Objects', 'Transform Arrays', 'Transform Values'] }, 'Animate', 'Allow Options', 'Blog about it...'] }, // eslint-disable-line max-len
sampleJSONString: 'Just a Test String',
sampleJSONArray: ['Just a Test String', 'in a Test Array', 'www.google.com', 0, 1, true, false]
};
},
methods: {
onChangeData(data) {
this.sampleJSON = data;
}
},
watch: {
sampleJSON() {
alert('updated sampleJSON'); // eslint-disable-line no-alert
}
}
});