Commit 37622212 by 宋冰琦

修复地区选择切换的bug

parent 32c4fda8
...@@ -79,7 +79,8 @@ export default { ...@@ -79,7 +79,8 @@ export default {
customerName: '', customerName: '',
show: false, show: false,
columns: [], columns: [],
loginInfo:"" loginInfo:"",
cityInfo:[]
}; };
}, },
computed: { computed: {
...@@ -194,7 +195,21 @@ export default { ...@@ -194,7 +195,21 @@ export default {
this.show = true; this.show = true;
}) })
}, },
changeHandler() { }, changeHandler(e) {
const {
columnIndex,
index,
picker = this.$refs.uPicker
} = e
if(columnIndex===0){
this.cityInfo = this.columns[0][index].children?this.columns[0][index].children:[]
picker.setColumnValues(1, this.cityInfo)
picker.setColumnValues(2, this.cityInfo[0].children?this.cityInfo[0].children:[])
}
if(columnIndex===1){
picker.setColumnValues(2, this.cityInfo[index].children?this.cityInfo[index].children:[])
}
},
confirm(res) { confirm(res) {
const { value } = res; const { value } = res;
console.log(value) console.log(value)
......
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