mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[bugfix] 修复Area组件边界条件时报错
This commit is contained in:
parent
19a89d38d2
commit
81e6e93bdd
@ -60,6 +60,11 @@ create({
|
|||||||
const { value } = event.detail;
|
const { value } = event.detail;
|
||||||
const { pickerValue, displayColumns } = this.data;
|
const { pickerValue, displayColumns } = this.data;
|
||||||
const index = pickerValue.findIndex((item, index) => item !== value[index]);
|
const index = pickerValue.findIndex((item, index) => item !== value[index]);
|
||||||
|
// 没有变更 或 选中项序号小于0 不处理
|
||||||
|
if (index < 0 || value[index] < 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const values = displayColumns[index];
|
const values = displayColumns[index];
|
||||||
|
|
||||||
this.code = values[value[index]].code;
|
this.code = values[value[index]].code;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user