Commit 29e43eaa authored by renjintao's avatar renjintao

userSelect Add Data

parent d5772c8a
......@@ -216,7 +216,7 @@ export default {
if (!this.multiple) {
//单选时返回信息
if (this.datas && this.datas.length > 0) {
var item2 = this.datas.filter(u => u.value == this.value);
var item2 = this.datas.filter(u => u.value == this.value);
if (item2 && item2[0]) {
items.push(item2[0]);
}
......@@ -228,12 +228,21 @@ export default {
}
} else {
//复选时返回
this.value.forEach(v => {
var item = this.dic.filter(u => u.value == v);
if (item && item[0]) {
items.push(item[0]);
}
});
if (this.datas && this.datas.length > 0) {
this.value.forEach(v => {
var item3 = this.dic.filter(u => u.value == v);
if (item3 && item3[0]) {
items.push(item3[0]);
}
});
} else {
this.value.forEach(v => {
var item = this.dic.filter(u => u.value == v);
if (item && item[0]) {
items.push(item[0]);
}
});
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment