<script> export default { data(){ return { items:[] } }, watch: { items: { handler(newValue,oldValue) { //newValue 改变后的数据 //oldValue 改变前的数据 } //,deep: true } } } </script>
如果监听对象内部属性改变需要增加deep: true