提交 cefdbf81 编写于 作者: Q qiang

fix: 修复 picker-view 组件某些情况 value 变更无法检测的问题 fixed #1290 #1162

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