Selectbox set default model..
This commit is contained in:
parent
d54c0369b9
commit
0fe4e143d4
@ -445,14 +445,14 @@ export default {
|
|||||||
description: "Selectbox attribute name"
|
description: "Selectbox attribute name"
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
type: [String, Number, Array],
|
type: [String, Number, Array, Object],
|
||||||
default: '',
|
default: '',
|
||||||
description: "Selectbox selected value"
|
description: "Selectbox selected value"
|
||||||
},
|
},
|
||||||
options: null,
|
options: null,
|
||||||
|
|
||||||
model: {
|
model: {
|
||||||
type: [String, Number],
|
type: [String, Number, Array, Object],
|
||||||
default: '',
|
default: '',
|
||||||
description: "Selectbox selected model"
|
description: "Selectbox selected model"
|
||||||
},
|
},
|
||||||
@ -544,7 +544,11 @@ export default {
|
|||||||
this.real_model = this.value;
|
this.real_model = this.value;
|
||||||
|
|
||||||
if (this.model.length) {
|
if (this.model.length) {
|
||||||
this.real_model = this.model;
|
if (eval(this.model) !== undefined) {
|
||||||
|
this.real_model = eval(this.model);
|
||||||
|
} else {
|
||||||
|
this.real_model = this.model;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.multiple && !this.real_model.length) {
|
if (this.multiple && !this.real_model.length) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user