Skip to content

Commit

Permalink
fix: 修复 picker-view 组件某些情况 value 变更无法检测的问题 fixed #1290 #1162
Browse files Browse the repository at this point in the history
  • Loading branch information
zhetengbiji committed Jan 19, 2020
1 parent c919122 commit cefdbf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/view/components/picker-view/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down

0 comments on commit cefdbf8

Please sign in to comment.