ant-design-pro
ant-design-pro copied to clipboard
🧐[问题 | question] v6开启多tabs失败
🧐 问题描述 | Problem description
6.0.0-beta.1 开启多tabs失败
💻 示例代码 | Sample code
config/config.tsx
...
keepalive: [/./],
tabsLayout: {},
...
🚑 其他信息 | Other information
ant-design-pro: 6.0.0-beta.1
@umijs/max: 4.0.17
OS: MacOS 12.5.1
Node:v18.8.0
浏览器 | browser:Chrome
以下的 Issues 可能会帮助到你 / The following issues may help you
- [#10161][85%]
- [#10102][85%]
- [#10055][85%]
- [#9981][85%]
- [#10110][81%]
- [#10192][79%]
- [#10017][79%]
- [#10158][78%]
- [#10099][78%]
- [#10067][78%]
- [#9977][78%]
- [#10097][77%]
- [#10089][77%]
- [#10170][76%]
- [#10100][76%]
- [#10082][76%]
- [#10027][76%]
- [#10134][75%]
- [#10114][75%]
- [#10044][75%]
- [#10043][75%]
- [#10012][75%]
- [#9966][75%]
- [#10163][66%]
- [#10042][65%]
- [#10127][64%]
- [#10045][64%]
- [#10009][63%]
- [#10187][62%]
- [#10107][62%]
- [#10084][62%]
- [#10039][62%]
- [#10010][62%]
- [#9962][62%]
- [#10142][61%]
- [#10153][60%]
- [#10074][60%]
- [#10072][60%]
- [#10053][60%]
- [#10048][60%]
- [#10126][59%]
- [#10143][57%]
- [#9994][57%]
- [#10006][56%]
- [#9998][56%]
- [#9991][56%]
- [#9968][56%]
- [#10022][55%]
- [#10019][55%]
- [#10018][55%]
- [#10008][55%]
- [#10029][54%]
- [#10035][53%]
在 src/app.tsx
中添加了 getKeepAlive
方法也还是不行
export const getKeepAlive = (ka: any) => {
return ka;
}
报错如下:
+1
同问
同问
export const getKeepAlive = (ka: any) => { return ka; }
解决了吗,大哥,我也遇到同样的问题
TAutomatically replying with ChatGPT can be attempted, but it cannot be guaranteed to be completely accurate and may not fully address all issues. Please feel free to reply if you have any further questions or concerns. 此回复基于 ChatGPT 自动生成,可以尝试下方案,官方人员会在一定时间后继续继续处理。
您好,这种问题可能是版本兼容性的问题,可以尝试使用最新的 antd-pro 和 umijs 来解决该问题。同时,也可以尝试看一下其他 issue 的讨论,看看其中是否有可以借鉴的解决方案。
另外,关于上述代码的问题,可能是由于src/app.tsx
中的导入有问题,可以尝试将以下代码添加到文件顶部来解决该问题:
import React from 'react';
import { KeepAlive } from 'umi';
希望能对您有所帮助。