From 5139216ee89fb8bae2348f6ece6ce08a3717b706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BA=E8=81=82=E5=8F=8C?= Date: Tue, 23 Nov 2021 19:53:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E4=B8=8BcacheAble=E4=B8=8D=E7=94=9F=E6=95=88?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/tabs/TabsView.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/layouts/tabs/TabsView.vue b/src/layouts/tabs/TabsView.vue index 9dba1e9..45dce62 100644 --- a/src/layouts/tabs/TabsView.vue +++ b/src/layouts/tabs/TabsView.vue @@ -301,7 +301,8 @@ export default { routes.forEach(item => { const cacheAble = item.meta?.page?.cacheAble ?? pCache ?? true if (!cacheAble) { - this.excludeKeys.push(new RegExp(`${item.path}\\d+$`)) + const path = item.path.replace(/:.+?\//g, '.+?/').replace(/:.+?$/g, '.+$') + this.excludeKeys.push(new RegExp(`${path}`)) } if (item.children) { this.loadCacheConfig(item.children, cacheAble)