fix(Area): can't select some oversea country (#4195)

This commit is contained in:
neverland 2019-08-22 19:26:36 +08:00 committed by GitHub
parent d2b28432cd
commit 664c1dd29c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,6 +110,7 @@ export default createComponent({
}
code = code.slice(0, compareNum);
for (let i = 0; i < list.length; i++) {
if (list[i].code.slice(0, compareNum) === code) {
return i;
@ -138,7 +139,7 @@ export default createComponent({
picker.setColumnValues(0, province);
picker.setColumnValues(1, city);
if (city.length && code.slice(2, 4) === '00') {
if (city.length && code.slice(2, 4) === '00' && !this.isOverseaCode(code)) {
[{ code }] = city;
}