You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (route?.children != null) {
for (const ele of route?.children) {
if (path?.toLowerCase() === ele.path?.toLowerCase()) {
if (ele.element?.props.to != null) {
console.log('redirect')
isKeep = false;
break;
}
}
}
}
完整方法如下:
const isKeepPath = (aliveList: any[], path: string, route:any) => {
let isKeep = false;
aliveList.map(item => {
if (item === path) {
isKeep = true;
}
if (item instanceof RegExp && item.test(path)) {
isKeep = true;
}
if (typeof item === 'string' && item?.toLowerCase() === path?.toLowerCase()) {
isKeep = true;
}
})
if(isKeep === false){
isKeep = !!route.isKeepalive;
}
if(route?.redirect) {
console.log('redirect')
isKeep = false;
}
if (route?.children != null) {
for (const ele of route?.children) {
if (path?.toLowerCase() === ele.path?.toLowerCase()) {
if (ele.element?.props.to != null) {
console.log('redirect')
isKeep = false;
break;
}
}
}
}
return isKeep;
}
The text was updated successfully, but these errors were encountered:
在antd pro V5中使用多标签tabs时。
若配置路由中配置
将出现循环点击时出现循环跳转,三级子页面点击时异常情况。
因此可以尝试在 node_modules/@alita/plugins/templates/keepalive/context.tpl中isKeepPath方法中追加以下内容:
完整方法如下:
The text was updated successfully, but these errors were encountered: