mirror of
https://github.com/youzan/vant.git
synced 2025-10-17 00:14:18 +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);
|
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;
|
||||||
|
Reference in New Issue
Block a user