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