mirror of
https://github.com/iczer/vue-antd-admin
synced 2025-04-06 04:00:06 +08:00
fix:修复动态路由下cacheAble不生效的问题
This commit is contained in:
parent
56635a948b
commit
5139216ee8
@ -301,7 +301,8 @@ export default {
|
|||||||
routes.forEach(item => {
|
routes.forEach(item => {
|
||||||
const cacheAble = item.meta?.page?.cacheAble ?? pCache ?? true
|
const cacheAble = item.meta?.page?.cacheAble ?? pCache ?? true
|
||||||
if (!cacheAble) {
|
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) {
|
if (item.children) {
|
||||||
this.loadCacheConfig(item.children, cacheAble)
|
this.loadCacheConfig(item.children, cacheAble)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user