From 17c4bad56fd902184f7c037dbdb22fd63289d1e7 Mon Sep 17 00:00:00 2001
From: Mila <Mila@pollex.com.tw>
Date: 星期二, 25 一月 2022 16:21:42 +0800
Subject: [PATCH] fixed: TODO#134613 [顧問管理流程] 搜尋欄位清空 , 未顯示原本的約訪中列表

---
 PAMapp/components/AddressPicker.vue |   28 +++++++++++++++++++---------
 1 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/PAMapp/components/AddressPicker.vue b/PAMapp/components/AddressPicker.vue
index e6ba650..95314fa 100644
--- a/PAMapp/components/AddressPicker.vue
+++ b/PAMapp/components/AddressPicker.vue
@@ -3,10 +3,10 @@
       <div class="subTitle mb-10">�����</div>
       <el-input
           type="text"
-          class="p mt-10 cursor--pointer "
+          class="p mt-10 cursor--pointer input-radius"
           tabindex="-1"
           v-model="keyWord"
-          @change="searchDistrict"
+          @input="searchDistrict"
           placeholder="隢撓���摮�"
       ></el-input>
       <Ui-ScrollPicker
@@ -23,17 +23,30 @@
 <script lang="ts">
 import { Vue, Component, Emit } from 'nuxt-property-decorator';
 
+import { taiwanCities } from '~/shared/const/taiwan-cities';
+
 @Component
 export default class AddressPicker extends Vue {
 
-    options = ['�����', '�����', '�����', '獢���', '�蝡孵��', '�蝡寧腦', '���腦', '�銝剖��', '敶啣�腦', '���腦', '���腦', '��儔撣�', '��儔蝮�', '�����', '擃���', '撅蝮�', '��蝮�', '��蝮�', '摰蝮�', '瞉�腦', '���蝮�', '��瘙腦'];
-    keyWord = '';
+    options      : string[] = taiwanCities;
+    keyWord      : string   = '';
     filterOptions: string[] = [];
-    district = '�����';
+    district     : string   = '�����';
+
+    //////////////////////////////////////////////////////////////////////
 
     mounted() {
         this.filterOptions = JSON.parse(JSON.stringify(this.options));
     }
+
+    //////////////////////////////////////////////////////////////////////
+
+    @Emit('confirm')
+    confirm(): string {
+        return this.district;
+    }
+
+    //////////////////////////////////////////////////////////////////////
 
     searchDistrict() {
         this.filterOptions = this.options.filter(e => e.match(this.keyWord));
@@ -43,10 +56,7 @@
         this.district = value;
     }
 
-    @Emit('confirm')
-    confirm() {
-        return this.district;
-    }
+
 
 }
 </script>

--
Gitblit v1.8.0