扫码关注官方订阅号
描述:testMsg是可以观察数据的,this.naerr也可以改变但是当item是个对象时,就无法观察。this.deerr无法改变? 有解决办法吗
认证0级讲师
https://cn.vuejs.org/v2/api/#...
watch: { a: function (val, oldVal) { console.log('new: %s, old: %s', val, oldVal) }, // 方法名 b: 'someMethod', // 深度 watcher c: { handler: function (val, oldVal) { /* ... */ }, deep: true } }
item: { deep: true, handler: function (val) { this.deerr = val.des + '消息' } }
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
https://cn.vuejs.org/v2/api/#...