保誠-保戶業務員媒合平台
Mila
2021-11-25 c9c705cc198b2da645a3a404ac47ad9e17df4c93
PAMapp/components/AddressPicker.vue
@@ -8,16 +8,19 @@
            @change="searchDistrict"
            placeholder="請輸入關鍵字"
        ></el-input>
       <Ui-ScrollPicker
        <Ui-ScrollPicker
            :options="filterOptions"
            :initValue="district"
            @change="change"
            @change="selectDistrict"
        ></Ui-ScrollPicker>
        <div class="text--center mt-10">
            <el-button type="primary" @click="confirm">確認</el-button>
        </div>
    </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 {
@@ -35,9 +38,15 @@
        this.filterOptions = this.options.filter(e => e.match(this.keyWord));
    }
    change(value: string) {
        console.log('change', value)
    selectDistrict(value: string): void {
        this.district = value;
    }
    @Emit('confirm')
    confirm() {
        return this.district;
    }
}
</script>