Commit 1d06f28d by Sweet Zhang

地区选择框修改

parent 38fbbb9b
......@@ -10,7 +10,7 @@ export default {
const model = { // 把后端返回过来的数据里面的键给替换成我想要的键
source: x,
text: x.provinceName ? x.provinceName : x.cityName,
value: x.provinceId ? x.provinceId : x.cityId,
value: x.cityId ? x.cityId: x.provinceId ,
};
const children = this.action(x.citys); // 子级数据
if(children){ // 一直往下循环查找有没有children这个键,如果有就直接添加一个子级字段名,这个字段名就是存子级数据
......
......@@ -58,10 +58,10 @@
methods:{
onchange(e) {
const value = e.detail.value
// console.log(e)
console.log(e)
},
onnodeclick(node) {
// console.log(node)
console.log(node)
},
resetParams(){
this.editParamLists = JSON.parse(JSON.stringify(this.paramsLists))
......@@ -72,6 +72,7 @@
console.log(res)
if(res['success']){
this.provinceList = common.action(res['data']['provinces']);
console.log(this.provinceList)
}
})
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment