提交 a1f82ab9 编写于 作者: fxy060608's avatar fxy060608

Merge branch 'v3' of https://github.com/dcloudio/uni-app into v3

......@@ -37,13 +37,15 @@ export default {
}
},
watch: {
value (val) {
this.valueSync.length = val.length
val.forEach((val, index) => {
if (val !== this.valueSync[index]) {
this.$set(this.valueSync, index, val)
}
})
value (val, oldVal) {
if (val === oldVal || val.length !== oldVal.length || val.find((item, index) => item !== oldVal[index])) {
this.valueSync.length = val.length
val.forEach((val, index) => {
if (val !== this.valueSync[index]) {
this.$set(this.valueSync, index, val)
}
})
}
},
valueSync: {
deep: true,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册