|
|
@ -327,10 +327,14 @@ import {computeArea} from '@/common/utils' |
|
|
|
|
|
|
|
function setPickerCol(columns, value, n){ |
|
|
|
if(columns.length<=0)return |
|
|
|
var v=value[n-1]||0 |
|
|
|
if(columns[v]?.children){ |
|
|
|
this.setColumnValues(n,columns[v].children) |
|
|
|
setPickerCol(columns[v].children, value, ++n) |
|
|
|
var v=value[n-1] |
|
|
|
if(v){ |
|
|
|
for(var i in columns){ |
|
|
|
if(columns[i].value==v&&columns[i].children){ |
|
|
|
this.setColumnValues(n,columns[i].children) |
|
|
|
setPickerCol(columns[i].children, value, ++n) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
function setPickerVal(columns, value){ |
|
|
@ -436,6 +440,7 @@ import {computeArea} from '@/common/utils' |
|
|
|
watch:{ |
|
|
|
columns(n){ |
|
|
|
if(this.type=='select'){ |
|
|
|
console.log(n[0],this.value) |
|
|
|
this.$nextTick(()=>{ |
|
|
|
setPickerCol.bind(this.$refs.picker)(n[0]||[],this.value,1) |
|
|
|
}) |
|
|
|