提交 309f2a33 编写于 作者: zhentian.jia's avatar zhentian.jia

二层节点

上级 6859e05d
...@@ -461,8 +461,7 @@ ...@@ -461,8 +461,7 @@
await this.getTown(provinceId, cityId, countyId); await this.getTown(provinceId, cityId, countyId);
} }
this.addressList = [Number(provinceId), Number(cityId), Number(countyId), Number(townId)]; this.addressList = [Number(provinceId), Number(cityId), Number(countyId), Number(townId)];
console.log(this.provinceList,this.addressList); console.log(this.provinceList);
// debugger;
this.$forceUpdate(); this.$forceUpdate();
}else { }else {
this.addressList = []; this.addressList = [];
...@@ -759,7 +758,9 @@ ...@@ -759,7 +758,9 @@
this.provinceList.map((item, index) => { this.provinceList.map((item, index) => {
if(item.id == provinceId) { if(item.id == provinceId) {
item.children.map((city, idx) => { item.children.map((city, idx) => {
if(city.id == cityId) {
city.children = this.countyLists; city.children = this.countyLists;
}
}) })
} }
}) })
...@@ -782,7 +783,9 @@ ...@@ -782,7 +783,9 @@
item.children.map((city, index2) => { item.children.map((city, index2) => {
if(city.id == cityId) { if(city.id == cityId) {
city.children.map((county, index3) => { city.children.map((county, index3) => {
if(county.id == countyId) {
county.children = this.townLists; county.children = this.townLists;
}
}) })
} }
}) })
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册