我有一个Vue.js应用程序,我有几个组件,只是为了处理一些重复的任务.
我还从AJAX请求中获取数据.
我想要了解的是,在Vue数据(treeData
和flatTreeData
)更新并执行操作后,是否有触发的事件,以便我可以执行任何其他操作?
var app = new Vue({
el: 'body',
data: {
treeData: {items: {}},
flatTreeData: [],
},
});
$.getJSON('./paths.json').done(function(data) {
// apply the file structure to the vue app
demo.treeData = data;
demo.flatTreeData = flattenTree(data);
});