|
@ -143,25 +143,28 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
onSelChange(value, item){
|
|
|
if(item.onChange){
|
|
|
if(item.multiple){
|
|
|
if(item.valueName.length < value.length){
|
|
|
var exist = _.find(item.optionList, (v)=>{
|
|
|
return v.value == value[value.length - 1]
|
|
|
})
|
|
|
item.valueName.push(exist.label)
|
|
|
if(item.multiple){
|
|
|
if(item.valueName.length < value.length){
|
|
|
var exist = _.find(item.optionList, (v)=>{
|
|
|
return v.value == value[value.length - 1]
|
|
|
})
|
|
|
item.valueName.push(exist.label)
|
|
|
} else {
|
|
|
if(value.length == 0){
|
|
|
item.valueName = []
|
|
|
} else {
|
|
|
if(value.length == 0){
|
|
|
item.valueName = []
|
|
|
} else {
|
|
|
_.each(item._value_bak, (v, i)=>{
|
|
|
if(value.indexOf(v) === -1){
|
|
|
item.valueName.splice(i, 1)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
_.each(item._value_bak, (v, i)=>{
|
|
|
if(value.indexOf(v) === -1){
|
|
|
item.valueName.splice(i, 1)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
item._value_bak = _.assign([], value)
|
|
|
}
|
|
|
item._value_bak = _.assign([], value)
|
|
|
}
|
|
|
|
|
|
if(item.onChange){
|
|
|
if(item.multiple){
|
|
|
item.onChange(value, item.valueName)
|
|
|
} else {
|
|
|
var exist = _.filter(item.optionList, (v)=>{
|