mirror of
https://github.com/youzan/vant.git
synced 2025-10-15 23:55:08 +00:00
feat(Area):适配8位,10位,12位等地区码,及处理东莞市等没有第三级区域码的问题 (#8001)
Co-authored-by: guoxiang <guox@ibumobile.com>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user