Ant-design-pro: v4代码我这为什么不会跳到登陆页面。例如http://localhost:8000/不会自动跳到http://localhost:8000/user/login

Created on 1 Jun 2019  ·  7Comments  ·  Source: ant-design/ant-design-pro

Most helpful comment

image
我安装了login 的block 但是发现页面页面变成这样,如何让login页面显示为顶层呢?
第一次用 pro, 应该在哪可以配置的吧?

图片
你要注意这个使用的外层布局不一样,你要自己该一下

All 7 comments

要么加权限 要么配置路由重定向

要么加权限 要么配置路由重定向
里面不是已经有加了么,为什么好像没效果啊,是不是要改什么

在路由配置里面加 authority: ['user']:

    {
      path: '/',
      component: '../layouts/BasicLayout',
      Routes: ['src/pages/Authorized'],
      authority: ['admin', 'user'],
      routes: [
        {
          path: '/',
          name: 'welcome',
          icon: 'smile',
          component: './Welcome',
          authority: ['user'],
        },
      ],
    },

在demo里面默认不跳转了

image
我安装了login 的block 但是发现页面页面变成这样,如何让login页面显示为顶层呢?
第一次用 pro, 应该在哪可以配置的吧?

image
我安装了login 的block 但是发现页面页面变成这样,如何让login页面显示为顶层呢?
第一次用 pro, 应该在哪可以配置的吧?

图片
你要注意这个使用的外层布局不一样,你要自己该一下

@952425340 👌,非常感谢!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  ·  3Comments

2uncle-code picture 2uncle-code  ·  3Comments

952425340 picture 952425340  ·  3Comments

yadongxie150 picture yadongxie150  ·  3Comments

lvzheng0404 picture lvzheng0404  ·  3Comments