区号只显示数字 添加了搜索

This commit is contained in:
luyuan 2020-11-03 09:49:01 +08:00
parent 719a179564
commit 613dc56db2
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3

View File

@ -23,8 +23,8 @@
</a-select-option> </a-select-option>
<a-select-option value="Jiangsu"> Jiangsu </a-select-option> <a-select-option value="Jiangsu"> Jiangsu </a-select-option>
</a-select> --> </a-select> -->
<a-select :default-value="quhaolist[0].code" size="small" @change="getquhao" class="getcode"> <a-select :default-value="quhaolist[0].name + '+' + quhaolist[0].code" size="small" option-label-prop="label" @change="getquhao" class="getcode" show-search >
<a-select-option v-for="(i,j) in quhaolist" :key="j" :value="i.code"> <a-select-option v-for="(i,j) in quhaolist" :key="j" :value="i.name + '+' + i.code" :label="'+' + i.code">
{{i.name}}+{{i.code}} {{i.name}}+{{i.code}}
</a-select-option> </a-select-option>
<!-- <a-select-option value="Jiangsu"> Jiangsu </a-select-option> --> <!-- <a-select-option value="Jiangsu"> Jiangsu </a-select-option> -->
@ -206,6 +206,7 @@ export default defineComponent({
function getquhao(e?: any){ function getquhao(e?: any){
console.log(e) console.log(e)
myquhao.value = e.toString() myquhao.value = e.toString()
myquhao.value = myquhao.value.split("+")[1];
console.log(myquhao.value) console.log(myquhao.value)
} }
function login(): void { function login(): void {