Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧐[问题 | question]我使用的动态路由,由服务端提供,这样我的登录或者其他页面如何不使用layout布局 #10998

Closed
liucaptainapp opened this issue Oct 4, 2023 · 4 comments

Comments

@liucaptainapp
Copy link

liucaptainapp commented Oct 4, 2023

🧐 问题描述 | Problem description

我使用的动态路由,有服务端提供,这样我的登录如何不使用layout布局,我开始是定义了一个登录的route数组,直接和服务端提供的路由放在一起(app.js的layput中),但是这样的话还是有layout样式在里面,比如上面有很明显的padding

💻 示例代码 | Sample code

export default [
  {
    name: '登录',
    path: '/login',
    parentId: null,
    layout: false,
    headerRender: false,
    footerRender: false,
    menuRender: false,
    menuHeaderRender: false,
    hideInMenu: true,
    hideChildrenInMenu: false,
    hideInBreadcrumb: false,
  }
];

🚑 其他信息 | Other information

OS:

Node:

浏览器 | browser

@chenshuai2144
Copy link
Collaborator

pure:ture ,试试这个配置

@liucaptainapp
Copy link
Author

pure:ture ,试试这个配置

这个好像是所有的样式都没了 我只想login页面Layout失效

@liucaptainapp liucaptainapp changed the title 🧐[问题 | question]我使用的动态路由,有服务端提供,这样我的登录如何不使用layout布局 🧐[问题 | question]我使用的动态路由,由服务端提供,这样我的登录或者其他页面如何不使用layout布局 Oct 10, 2023
@haobarry
Copy link

haobarry commented Oct 10, 2023

在路由里面配置
去看umi的配置

@liucaptainapp
Copy link
Author

liucaptainapp commented Oct 12, 2023

pure:ture ,试试这个配置

我没有配置config里面的route,我所有的路由是通过appjs 里面Layout中的route配置的,没有找到不使用layout的配置属性,我之前旧版是通过Login.layout = false; 直接在页面组件中关掉layout样式,现在好像取消了这种写法。LeaseSaleRecordCenter.wrappers = ['@/wrappers/auth'];还有这种写法也没了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants