From b6661a090e8bcf8f45be24a01b6a7bb08e3aaff1 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期三, 08 十二月 2021 08:50:04 +0800 Subject: [PATCH] refactor: pages component - separate vue files --- PAMapp/components/AddressPicker.vue | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/PAMapp/components/AddressPicker.vue b/PAMapp/components/AddressPicker.vue index 6315ce2..f228699 100644 --- a/PAMapp/components/AddressPicker.vue +++ b/PAMapp/components/AddressPicker.vue @@ -1,6 +1,6 @@ <template> - <div class="text--center" @click="close"> - <div class="subTitle mb-10" @click="close">������</div> + <div class="text--center"> + <div class="subTitle mb-10">������</div> <el-input type="text" class="p mt-10" @@ -13,6 +13,9 @@ :initValue="district" @change="selectDistrict" ></Ui-ScrollPicker> + <div class="text--center mt-10"> + <el-button type="primary" @click="confirm">蝣箄��</el-button> + </div> </div> </template> @@ -22,7 +25,7 @@ @Component export default class AddressPicker extends Vue { - options = ['�����', '�����', '�����', '獢�腦', '�蝡孵��', '�蝡寧腦', '���腦', '�銝剖��', '敶啣�腦', '���腦', '���腦', '��儔撣�', '��儔蝮�', '�����', '擃���', '撅蝮�', '��蝮�', '��蝮�', '摰蝮�', '瞉�腦', '���蝮�', '��瘙腦']; + options = ['�����', '�����', '�����', '獢���', '�蝡孵��', '�蝡寧腦', '���腦', '�銝剖��', '敶啣�腦', '���腦', '���腦', '��儔撣�', '��儔蝮�', '�����', '擃���', '撅蝮�', '��蝮�', '��蝮�', '摰蝮�', '瞉�腦', '���蝮�', '��瘙腦']; keyWord = ''; filterOptions: string[] = []; district = '�����'; @@ -31,19 +34,17 @@ this.filterOptions = JSON.parse(JSON.stringify(this.options)); } - searchDistrict() { this.filterOptions = this.options.filter(e => e.match(this.keyWord)); } - @Emit('change') selectDistrict(value: string): void { this.district = value; } - @Emit() - close(): void { - console.log('close district drawer!'); + @Emit('confirm') + confirm() { + return this.district; } } -- Gitblit v1.8.0