feat(Area):适配8位,10位,12位等地区码,及处理东莞市等没有第三级区域码的问题 (#8001)

Co-authored-by: guoxiang <guox@ibumobile.com>
This commit is contained in:
Air 2021-01-26 14:23:48 +08:00 committed by GitHub
parent 02d743c7ce
commit f9ef352cde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -137,6 +137,10 @@ export default createComponent({
code = code.slice(0, compareNum);
if(type === 'county') {
compareNum = code.length
}
for (let i = 0; i < list.length; i++) {
if (list[i].code.slice(0, compareNum) === code) {
return i;