mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-22 22:49:15 +08:00
[bugfix] Area: city list empty (#1374)
This commit is contained in:
parent
cc8951ffcd
commit
c53be5bf6f
@ -127,7 +127,9 @@ export default create({
|
||||
if (index === 0) {
|
||||
const cityList = this.getList('city', code.slice(0, 2));
|
||||
picker.setColumnValues(1, cityList);
|
||||
code = cityList[0].code;
|
||||
if (cityList.length) {
|
||||
code = cityList[0].code;
|
||||
}
|
||||
}
|
||||
|
||||
picker.setColumnValues(2, this.getList('county', code.slice(0, 4)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user