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

本地项目启动后首次进入布局错误 #11182

Closed
mayongkang1 opened this issue Mar 13, 2024 · 1 comment
Closed

本地项目启动后首次进入布局错误 #11182

mayongkang1 opened this issue Mar 13, 2024 · 1 comment

Comments

@mayongkang1
Copy link

错误布局截图:
企业微信截图_17103211633435

正确布局截图:
企业微信截图_1710321198775

pro版本
3.2.1

package.json依赖版本信息
"dependencies": { "@ant-design/icons": "^4.8.1", "@ant-design/pro-components": "^2.6.48", "@types/nprogress": "^0.2.3", "@umijs/route-utils": "^2.2.2", "antd": "^5.13.2", "antd-style": "^3.6.1", "classnames": "^2.5.1", "lodash": "^4.17.21", "moment": "^2.30.1", "nprogress": "^0.2.0", "omit.js": "^2.0.2", "querystring": "^0.2.1", "rc-menu": "^9.12.4", "rc-util": "^5.38.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-helmet-async": "^1.3.0" },

defaultSetting.ts文件
`
import { ProLayoutProps } from '@ant-design/pro-components';

/**

  • @name
    */
    const Settings: ProLayoutProps & {
    pwa?: boolean;
    logo?: string;
    } = {
    navTheme: 'light',
    // 拂晓蓝
    colorPrimary: '#1890ff',
    layout: 'mix',
    contentWidth: 'Fluid',
    fixedHeader: true,
    fixSiderbar: true,
    colorWeak: false,
    splitMenus: true,
    siderMenuType: "group",
    title: '接口平台系统',
    pwa: true,
    logo: 'http://dataops.chinacscs.com/favicon.ico',
    iconfontUrl: '//at.alicdn.com/t/c/font_4463357_4you09sgpi7.js',
    token: {
    bgLayout: 'rgb(255,255,255)',
    header: {
    colorTextMenuSelected: 'rgb(22, 119, 255)',
    colorTextMenuActive: 'rgb(22, 119, 255)',
    colorBgMenuItemHover: 'rgb(22, 119, 255, 0.1)',
    colorBgMenuItemSelected: 'rgb(22, 119, 255, 0.1)',
    colorBgHeader:'rgb(255,255,255)'
    },
    sider: {
    colorBgMenuItemHover: 'rgb(22, 119, 255, 0.1)', // 鼠标移入时背景颜色
    colorTextMenuItemHover: 'rgb(22, 119, 255)', // 鼠标移入时字体颜色
    colorBgMenuItemSelected: 'rgb(22, 119, 255, 0.1)', // 菜单选中时背景颜色
    colorTextMenuSelected: 'rgb(22, 119, 255)', // 菜单选中时字体颜色
    colorMenuBackground:'rgb(255,255,255)'
    },
    pageContainer: {
    paddingBlockPageContainerContent: 20,
    paddingInlinePageContainerContent: 20,
    }
    },
    };

export default Settings;
`

其他信息:
只有在项目启动后首次进入会出现布局错误,刷新页面后布局正常。

@AmberSanyu
Copy link

检查下你运行时的配置和你的静态配置差异呢

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

2 participants