| | |
| | | @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 { |
| | |
| | | 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> |
| | | |