Skip to content

Commit

Permalink
fix(Select): parse add warn
Browse files Browse the repository at this point in the history
  • Loading branch information
vvpvvp committed Mar 14, 2019
1 parent e2e96d7 commit de2f012
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/select/select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ export default {
parse() {
if (this.multiple) {
let values = this.value || [];
if (utils.isArray(values)) {
console.warn(`Select: ${values} can't be a value of a multiple select`);
return;
}
this.codes = values.map((item) => {
return this.type == 'key' ? this.getValue(item) : item[this.key];
}).filter(item => item !== null);
Expand Down

0 comments on commit de2f012

Please sign in to comment.