mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(Area):适配8位,10位,12位等地区码,及处理东莞市等没有第三级区域码的问题 (#8001)
Co-authored-by: guoxiang <guox@ibumobile.com>
This commit is contained in:
parent
02d743c7ce
commit
f9ef352cde
@ -137,6 +137,10 @@ export default createComponent({
|
|||||||
|
|
||||||
code = code.slice(0, compareNum);
|
code = code.slice(0, compareNum);
|
||||||
|
|
||||||
|
if(type === 'county') {
|
||||||
|
compareNum = code.length
|
||||||
|
}
|
||||||
|
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
if (list[i].code.slice(0, compareNum) === code) {
|
if (list[i].code.slice(0, compareNum) === code) {
|
||||||
return i;
|
return i;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user