selectview

szh_zidingyibiaoti
lilu 2 years ago
parent 4b3c6b4a93
commit 4a27761f73

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

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

Loading…
Cancel
Save