Ant Design Pro+umiJs生成左侧导航栏,重复点击相同面包屑,导航栏选中样式消失问题?

第一次点击运维管理,样式生效
image.png
第二点击运维管理,样式消失
image.png

路由参数//运维管理
{

path: '/operation',
name: 'operation',
icon: 'sync',
access: 'normalRouteFilter',
routes: [
  {
    path: '/operation',
    redirect: '/operation/resource',
  },
  {
    name: 'resource',
    path: '/operation/resource',
    access: 'normalRouteFilter',
    routes: [
      {
        path: '/operation/resource',
        component: './operation/resource',
      },
      {
        name: 'detail',
        hideInMenu: true,
        path: '/operation/resource/detail',
        component: './operation/resource/components',
        access: 'normalRouteFilter',
      },
    ],
  },
],

}

defaultSettings.ts 页面配置
import { Settings as LayoutSettings } from '@ant-design/pro-components';

const Settings: LayoutSettings & {
pwa?: boolean;
logo?: string;
} =
{

navTheme: 'light',
// 拂晓蓝
primaryColor: '#1890ff',
layout: 'mix',
contentWidth: 'Fluid',
fixedHeader: false,
fixSiderbar: true,
colorWeak: false,
title: 'Ant Design Pro',
pwa: false,
logo: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
iconfontUrl: '',

};

export default Settings;

阅读 2.3k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏