|
@ -144,10 +144,31 @@ export default {
|
|
|
},
|
|
|
onSelChange(value, item){
|
|
|
if(item.onChange){
|
|
|
var exist = _.filter(item.optionList, (v)=>{
|
|
|
return v.value == value
|
|
|
})
|
|
|
item.onChange(exist)
|
|
|
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 {
|
|
|
_.each(item._value_bak, (v, i)=>{
|
|
|
if(value.indexOf(v) === -1){
|
|
|
item.valueName.splice(i, 1)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
item._value_bak = _.assign([], value)
|
|
|
item.onChange(value, item.valueName)
|
|
|
} else {
|
|
|
var exist = _.filter(item.optionList, (v)=>{
|
|
|
return v.value == value
|
|
|
})
|
|
|
item.onChange(exist)
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
onCheckboxChange(values, item){
|