|
|
|
@ -9,6 +9,7 @@
|
|
|
|
|
:dropdownMatchSelectWidth="false"
|
|
|
|
|
@change="debounce(handleChange, 0, $event)"
|
|
|
|
|
@focus="getSelectFirst"
|
|
|
|
|
@search="handleSearch"
|
|
|
|
|
>
|
|
|
|
|
<a-select-option v-for="(item, index) in selectList" :key="index" :value="index">
|
|
|
|
|
<template v-for="(label, lindex) in showLabel">
|
|
|
|
@ -45,6 +46,10 @@ export default {
|
|
|
|
|
return {}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
openSearch: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: false
|
|
|
|
|
},
|
|
|
|
|
// 注意,需要显示的字段放在第一位
|
|
|
|
|
showLabel: {
|
|
|
|
|
type: Array,
|
|
|
|
@ -101,7 +106,7 @@ export default {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.inEdit = false
|
|
|
|
|
}, 800)
|
|
|
|
|
this.value = this.selectList[e][this.showLabel[0]]
|
|
|
|
|
// this.value = this.selectList[e][this.showLabel[0]]
|
|
|
|
|
this.$emit('change', {
|
|
|
|
|
type: this.type,
|
|
|
|
|
res: this.selectList[e]
|
|
|
|
@ -119,6 +124,11 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleSearch (e) {
|
|
|
|
|
console.log('select - 搜索 :', e)
|
|
|
|
|
if (this.openSearch) { return false }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|