From 737d58f6f2efcb936f4bc08d0727be8f01eb0921 Mon Sep 17 00:00:00 2001 From: iczer <1126263215@qq.com> Date: Thu, 12 Jan 2023 18:16:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20the=20problem=20of=20disable=20cache=20o?= =?UTF-8?q?f=20dynamic=20route;=20:bug:=20=E4=BF=AE=E5=A4=8D=EF=BC=9A?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E8=B7=AF=E7=94=B1=E9=85=8D=E7=BD=AE=E7=A6=81?= =?UTF-8?q?=E7=94=A8=E7=BC=93=E5=AD=98=E6=97=A0=E6=95=88=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/tabs/TabsView.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/tabs/TabsView.vue b/src/layouts/tabs/TabsView.vue index 9dba1e9..979e71f 100644 --- a/src/layouts/tabs/TabsView.vue +++ b/src/layouts/tabs/TabsView.vue @@ -301,7 +301,7 @@ export default { routes.forEach(item => { const cacheAble = item.meta?.page?.cacheAble ?? pCache ?? true if (!cacheAble) { - this.excludeKeys.push(new RegExp(`${item.path}\\d+$`)) + this.excludeKeys.push(new RegExp(`${item.path.replace(/:[^/]*/g, '[^/]*')}\\d*$`)) } if (item.children) { this.loadCacheConfig(item.children, cacheAble)