$emit:父传子
props:子传父
<template>
<section>
<el-select v-model="provinceAreaCode" placeholder="请选择" @change="getCityList">
<el-option
v-for="(item,index) in provinceList"
:key="index"
:label="item.areaName"
:value="item.areaCode"
>
{
{ item.areaName }}
</el-option>
</el-select>
<el-select v-model="cityAreaCode" placeholder="请选择" @change="getAreaList">
<el-option
v-for="(item,index) in cityList"
:key="index"
:label="item.areaName"
:value="item.areaCode"
>
{
{ item.areaName }}
</el-option>
</el-select>
<el-select v-model="streetAreaCode" placeholder="请选择">
<el-option
v-for="(item,index) in areaList"
:key="index"
:label="item.areaName"
:value="item.areaCode"
>
{
{ i
vue+element省市区三级联动(可直接使用)
最新推荐文章于 2024-07-18 10:57:21 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)