美文网首页
引用省市区组件

引用省市区组件

作者: 一枚小菜 | 来源:发表于2020-04-13 16:58 被阅读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
                     }
            }

相关文章

网友评论

      本文标题:引用省市区组件

      本文链接:https://www.haomeiwen.com/subject/xeptvhtx.html