保誠-保戶業務員媒合平台
wayne
2021-11-12 505f666d3ecf3688778c079a8bbfb366d695cf22
PAMapp/components/AddressPicker.vue
@@ -1,6 +1,6 @@
<template>
    <div class="text--center">
        <div class="subTitle mb-10">所在地區</div>
    <div class="text--center" @click="close">
        <div class="subTitle mb-10" @click="close">所在地區</div>
        <el-input
            type="text"
            class="p mt-10"
@@ -11,13 +11,13 @@
       <Ui-ScrollPicker
            :options="filterOptions"
            :initValue="district"
            @change="change"
            @change="selectDistrict"
        ></Ui-ScrollPicker>
    </div>
</template>
<script lang="ts">
import { Vue, Component } from 'nuxt-property-decorator';
import { Vue, Component, Emit } from 'nuxt-property-decorator';
@Component
export default class AddressPicker extends Vue {
@@ -31,13 +31,21 @@
        this.filterOptions = JSON.parse(JSON.stringify(this.options));
    }
    searchDistrict() {
        this.filterOptions = this.options.filter(e => e.match(this.keyWord));
    }
    change(value: string) {
        console.log('change', value)
    @Emit('change')
    selectDistrict(value: string): void {
        this.district = value;
    }
    @Emit()
    close(): void {
        console.log('close district drawer!');
    }
}
</script>