first of all, the interface looks like this
:
1.elementUI
2.: -
3.: - Mayabeque
4.Mayabeque
according to the normal logic, I deleted the country, and the corresponding province should be deleted automatically.
<el-select v-model="countryID" multiple filterable placeholder="" @change="loadRegion()">
<el-option
width="100%"
v-for="item in list_country"
:key="item.value"
:label="item.name"
:value="item.value">
</el-option>
</el-select>
{{countryID}}
<el-select v-model="regionID" multiple filterable placeholder="">
<el-option
width="100%"
v-for="item in list_region"
:key="item.value"
:label="item.name"
:value="item.value">
</el-option>
</el-select>
function of loadRegion ():
1:
1.
2.this.list_region =
question : this.countryID is used to save the country selected by the user, but I don"t know how to judge. If the country deletes the corresponding province, it also deletes it.