Ant-design-pro: 4.0怎么新增页面

Created on 9 Jun 2019  ·  10Comments  ·  Source: ant-design/ant-design-pro

在pages里面创建页面,按照文档说明在router.config.js里面新增路由配置后页面无法访问,并且文档里面写的路径是config/router.config.js,而脚手架里面的路径是scripts/router.config.js。

😸Documentation

Most helpful comment

入门-常见问题-models/menu 404
入门-常见问题-config/router.config.js 项目没有此文件,路径是scripts/router.config.js?
进阶-图表-查看图表组件/独立使用 Pro 组件 404
进阶-图表-components/Charts 没有这个文件夹

All 10 comments

文档还没更新V4。如果是右边的sidemenu并添加页面的话,请到脚手架位置下config/config.js的里面的const route里面去配置,千万别碰src/page/.umi/route.js 每一次重新编译都会按照config里面的配置重新生成,另外子菜单的component生成的路径很奇怪,如果大佬可以的话试一下,一级菜单没问题

@zombieJ @chenshuai2144 文档漏了。

v4加菜单玩不转~~

v4 好多文档还是 v2 的,坐等各位大佬踩坑 😂

@SuFIND 谢谢,确实是在config/config.js里面增加路由。

入门-常见问题-models/menu 404
入门-常见问题-config/router.config.js 项目没有此文件,路径是scripts/router.config.js?
进阶-图表-查看图表组件/独立使用 Pro 组件 404
进阶-图表-components/Charts 没有这个文件夹

close by ant-design/ant-design-pro-site#298

我的菜单是从后台获取的,还要再config/config.js里面再配置路由?

我的菜单是从后台获取的,还要再config/config.js里面再配置路由?

文档有写:https://pro.ant.design/docs/router-and-nav-cn

Was this page helpful?
0 / 5 - 0 ratings

Related issues

952425340 picture 952425340  ·  3Comments

lvzheng0404 picture lvzheng0404  ·  3Comments

yadongxie150 picture yadongxie150  ·  3Comments

cheung1111 picture cheung1111  ·  3Comments

happier2 picture happier2  ·  3Comments