Skip to content

Commit

Permalink
fix: selected val
Browse files Browse the repository at this point in the history
  • Loading branch information
fredfhu committed Aug 16, 2024
1 parent d75dde8 commit 5a1106d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ export default {
methods: {
onChange(val) {
console.log(val)
console.log(this.storeCodes)
},
onChange2(val) {
console.log(val)
console.log(this.storeCodes2)
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/components/ElSelectAll.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ export default {
if (!oldVal.includes('all') && !val.includes('all')) {
if (val.length === allValues.length - 1) this.selected = (this.widthAll ? ['all'] : []).concat(val)
}
this.$emit('input', (this.selected || []).filter(v => {
return v !== 'all'
}))
// 储存当前最后的结果 作为下次的老数据
this.oldMdoptionsValue[1] = this.selected
}
Expand Down

0 comments on commit 5a1106d

Please sign in to comment.