From f9ef352cdeddaab6a4d178b83069177dd5243f21 Mon Sep 17 00:00:00 2001 From: Air Date: Tue, 26 Jan 2021 14:23:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(Area):=E9=80=82=E9=85=8D8=E4=BD=8D,10?= =?UTF-8?q?=E4=BD=8D,12=E4=BD=8D=E7=AD=89=E5=9C=B0=E5=8C=BA=E7=A0=81,?= =?UTF-8?q?=E5=8F=8A=E5=A4=84=E7=90=86=E4=B8=9C=E8=8E=9E=E5=B8=82=E7=AD=89?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E7=AC=AC=E4=B8=89=E7=BA=A7=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E7=A0=81=E7=9A=84=E9=97=AE=E9=A2=98=20(#8001)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: guoxiang --- src/area/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/area/index.js b/src/area/index.js index e60357c27..eb18aaf93 100644 --- a/src/area/index.js +++ b/src/area/index.js @@ -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;