selectview

szh_zidingyibiaoti
lilu 2 years ago
parent 4b3c6b4a93
commit 4a27761f73

@ -146,6 +146,7 @@
searchApi="GetYardlist" searchApi="GetYardlist"
:searchQuery="{ keyword: '' }" :searchQuery="{ keyword: '' }"
:showLabel="['name', 'showCode']" :showLabel="['name', 'showCode']"
:openSearch="true"
@change="getSelectViewRes" @change="getSelectViewRes"
style="flex:1;margin-top:-4px;" style="flex:1;margin-top:-4px;"
></selectView> ></selectView>

@ -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 }
} }
} }
} }

Loading…
Cancel
Save