antd pro学习记录

antd pro学习记录antdpro 是一个后台模板 但上手之后还是有种劝退的感觉 要读懂代码还是得花点功夫 把区块装好会自动生成路由对象 启动项目后为什么会重定向到 user login routes path component layouts BlankLayout routes pa

antd pro是一个后台模板,但上手之后还是有种劝退的感觉,要读懂代码还是得花点功夫。

把区块装好会自动生成路由对象,启动项目后为什么会重定向到/user/login?

routes: [ { 
    path: '/', component: '../layouts/BlankLayout', routes: [ { 
    path: '/user', component: '../layouts/UserLayout', routes: [ { 
    path: '/user', redirect: '/user/login', }, { 
    name: 'login', path: '/user/login', component: './user/login', }, { 
    name: 'register-result', path: '/user/register-result', component: './user/register-result', }, { 
    name: 'register', path: '/user/register', component: './user/register', }, { 
    component: '404', }, ], }, { 
    path: '/', component: '../layouts/BasicLayout', Routes: ['src/pages/Authorized'], authority: ['admin', 'user'], routes: [ { 
    path: '/dashboard', name: 'dashboard', icon: 'dashboard', routes: [ { 
    name: 'analysis', path: '/dashboard/analysis', component: './dashboard/analysis', }, { 
    name: 'monitor', path: '/dashboard/monitor', component: './dashboard/monitor', }, { 
    name: 'workplace', path: '/dashboard/workplace', component: './dashboard/workplace', }, ], }, { 
    path: '/form', icon: 'form', name: 'form', routes: [ { 
    name: 'basic-form', path: '/form/basic-form', component: './form/basic-form', }, { 
    name: 'step-form', path: '/form/step-form', component: './form/step-form', }, { 
    name: 'advanced-form', path: '/form/advanced-form', component: './form/advanced-form', }, ], }, { 
    path: '/list', icon: 'table', name: 'list', routes: [ { 
    path: '/list/search', name: 'search-list', component: './list/search', routes: [ { 
    path: '/list/search', redirect: '/list/search/articles', }, ], }, { 
    name: 'table-list', path: '/list/table-list', component: './list/table-list', }, { 
    name: 'basic-list', path: '/list/basic-list', component: './list/basic-list', }, ], }, { 
    path: '/profile', name: 'profile', icon: 'profile', routes: [], }, { 
    name: 'result', icon: 'check-circle-o', path: '/result', routes: [], }, { 
    name: 'exception', icon: 'warning', path: '/exception', routes: [], }, { 
    name: 'account', icon: 'user', path: '/account', routes: [], }, { 
    name: 'editor', icon: 'highlight', path: '/editor', routes: [], }, { 
    path: '/', redirect: '/dashboard/analysis', authority: ['admin', 'user'], }, { 
    component: '404', }, ], }, ], }, ], 
path: '/', component: '../layouts/BasicLayout', Routes: ['src/pages/Authorized'], authority: ['admin', 'user'], 

antd pro /umiJs 怎么设置环境变量

define: { "process.env":{ port:3000 } }, 

然后改一下 package.json 里的命令:cross-env UMI_ENV=development umi dev

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/199270.html原文链接:https://javaforall.net

(0)
上一篇 2026年3月26日 下午1:29
下一篇 2026年3月26日 下午1:29


相关推荐

  • OpenClaw安装全攻略

    OpenClaw安装全攻略

    2026年3月13日
    2
  • 10个的常用PyCharm插件

    10个的常用PyCharm插件安装方法先来说说插件的安装方法,一点都不难。选择顶部菜单栏的PyCharm选项,打开Preferences,点击plugins,在右侧的文本框中输入想要查看的插件名称,在下方就会罗列出已经安装的相关的插件。找到我们所需要的对应插件之后,点击install即可完成下载,然后重启一下Pycharm即可插件介绍1、MaterialThemeUILite该插件的作用在于能够为Pycharm提供多种不同的页面风格。设置:选择顶部菜单栏的PyCharm选项,打开Pref

    2022年6月24日
    65
  • hackbar 使用教程_hackbar简单安装使用教程

    hackbar 使用教程_hackbar简单安装使用教程安装hackbar:在火狐的附加组件中搜索“hackbar”,将它添加到火狐浏览器中,重启后Firefox后安装完成,按F9键打开我们就会看到在地址栏下面会出现一个大框框就是hackbar了框框很大碍事怎么办?简单啊F9试试首先先介绍横向第一排的下拉框:INT、HEX、OCT、Alphabet、AlNum分别代表了整数、十六进制、八进制、字母表、所有。假设你的输入框中有a这个字符,然后你将…

    2022年6月4日
    649
  • TT-付款方式_后tt付款方式是货到付款吗

    TT-付款方式_后tt付款方式是货到付款吗付款方式 一般T/T是可以的,上述客户我们采用的付款方式就是定金加TT,如果是信用证方式,那么需要资信良好的开证行: 中国工商银行 汇丰银行 渣打银行&#160

    2022年8月1日
    9
  • RewriteCond apche获取url参数

    RewriteCond apche获取url参数开发系统中用到:RewriteEngineonRewriteCond%{QUERY_STRING}ser=([a-zA-Z0-9_]+)RewriteRule^/engine(.*)$http://e.smartearth.cn:9000/%1?%{QUERY_STRING}[P]RewriteCond%{QUERY_STRING}ser=([a-zA-Z0-9

    2022年5月23日
    28
  • 即梦ai被自动扣费怎么申请退款苹果

    即梦ai被自动扣费怎么申请退款苹果

    2026年3月12日
    2

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号