From fab396b503b0915976d9e017c7bf9fb6518d8288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tony=E6=98=9F?= <7762581+tony_tong_xin@user.noreply.gitee.com> Date: Tue, 7 Jun 2022 07:07:48 +0000 Subject: [PATCH] =?UTF-8?q?update=20src/utils/other.ts.=20=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E8=B7=AF=E7=94=B1=E5=9B=BD=E9=99=85=E5=8C=96=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E4=BF=AE=E5=A4=8D=EF=BC=8C=E5=8E=9F=E6=AD=A3=E5=88=99?= =?UTF-8?q?=E8=A1=A8=E8=BE=BE=E5=BC=8F=E5=AE=B9=E6=98=93=E5=8C=B9=E9=85=8D?= =?UTF-8?q?=E5=88=B0menu=E4=B9=8B=E7=B1=BB=E5=B8=A6en=EF=BC=8Czh=E7=9A=84?= =?UTF-8?q?=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/other.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/other.ts b/src/utils/other.ts index a042ccd..8a3d66c 100644 --- a/src/utils/other.ts +++ b/src/utils/other.ts @@ -51,7 +51,7 @@ export function setTagsViewNameI18n(item: any) { let tagsViewName: any = ''; const { query, params, meta } = item; if (query?.tagsViewName || params?.tagsViewName) { - if (/zh-cn|en|zh-tw/.test(query?.tagsViewName) || /zh-cn|en|zh-tw/.test(params?.tagsViewName)) { + if (/\/zh-cn|en|zh-tw\//.test(query?.tagsViewName) || /\/(zh-cn|en|zh-tw)\//.test(params?.tagsViewName)) { // 国际化 const urlTagsParams = (query?.tagsViewName && JSON.parse(query?.tagsViewName)) || (params?.tagsViewName && JSON.parse(params?.tagsViewName)); tagsViewName = urlTagsParams[i18n.global.locale];