引用省市区组件

2020-04-13  本文已影响0人  一枚小菜
效果 引入组件
    <AreaSelect @change="citySel"></AreaSelect>
  import AreaSelect from '@/components/child-components/area-select'
  export default {
    components: {
      AreaSelect
    },
    data() {
      return {
        searchData: {
          conditions: {
            province: '',
            city: '',
            region: ''
          },
          page: {
            page: 1,
            num: 10,
            listTotal: 0
          }
        }
      }
    },
   methods: {
      citySel(value) {
        this.searchData.conditions.province = value.province
        this.searchData.conditions.city = value.city
        this.searchData.conditions.region = value.region
                     }
            }
上一篇 下一篇

猜你喜欢

热点阅读