Skip to content

Commit

Permalink
Merge pull request #12 from fred-hu/develop
Browse files Browse the repository at this point in the history
fix: selected val
  • Loading branch information
fred-hu authored Aug 16, 2024
2 parents 5757c53 + 5a1106d commit 0d31b6c
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 0d31b6c

Please sign in to comment.