摘要: 一、监听数组 1.watch能监听到数组的push的改变,例如 data () { return { demo: [1,2] } }, mounted (){ window.myVue = this }, watch: { demo(val){ console.log(val) } }, myVue 阅读全文