Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

常见问题 #26

Closed
fangzhengjin opened this issue Apr 17, 2022 · 0 comments
Closed

常见问题 #26

fangzhengjin opened this issue Apr 17, 2022 · 0 comments

Comments

@fangzhengjin
Copy link
Owner

fangzhengjin commented Apr 17, 2022

1. 有示例代码吗?

演示代码在 demo 分支

2. 配置后标签栏位置出现了偏移

请在 app.tsx 的 layout 方法中添加 disableContentMargin: true 配置

3. 登录页出现了标签页怎么办?

登录页不要在路由写 name, 有 name 就有标签页,或者在 name 下方再加一个配置,hideInPanelTab: true,也可以在标签中隐藏

4. 提示 @umijs/plugin-access is already registered

可能是你使用的umijs版本太新了!!!
当前新版默认不再约定使用access.ts自动开启, 尝试在config.ts中添加access: {}试试~
详见umijs/plugins#779

5. 需要自定义控制缓存?

请参阅依赖 umi-plugin-keep-alivereact-activation

6. 项目中使用了国际化菜单, 标签没有国际化?

该插件默认不开启国际化模式, 需要在config.ts配置打开autoI18n: true

7. 列表页在标签下方出现了标题和面包屑, 怎么去掉?

在对应页面中给PageContainer增加两个属性title={false} breadcrumb={undefined}

8. 标签页上方的header随页面滚动, 怎么固定?

defaultSettings.tsfixedHeader: true

9. 怎么将面包屑放到标签栏上方的header中?

app.tslayout函数中返回值加入headerContentRender: () => <ProBreadcrumb />

@fangzhengjin fangzhengjin pinned this issue Apr 17, 2022
Repository owner locked and limited conversation to collaborators Apr 17, 2022
Repository owner unlocked this conversation Aug 9, 2022
Repository owner locked and limited conversation to collaborators Aug 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant