mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
[bugfix] Area: city list empty (#1374)
This commit is contained in:
@@ -127,8 +127,10 @@ export default create({
|
|||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
const cityList = this.getList('city', code.slice(0, 2));
|
const cityList = this.getList('city', code.slice(0, 2));
|
||||||
picker.setColumnValues(1, cityList);
|
picker.setColumnValues(1, cityList);
|
||||||
|
if (cityList.length) {
|
||||||
code = cityList[0].code;
|
code = cityList[0].code;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
picker.setColumnValues(2, this.getList('county', code.slice(0, 4)));
|
picker.setColumnValues(2, this.getList('county', code.slice(0, 4)));
|
||||||
this.$emit('change', picker, values, index);
|
this.$emit('change', picker, values, index);
|
||||||
|
Reference in New Issue
Block a user