pro-components icon indicating copy to clipboard operation
pro-components copied to clipboard

🐛[BUG] pro-components 2.3.12 出现 routes 将会废弃,为了保证兼容请使用 children 作为子节点定义方式

Open amin168 opened this issue 1 year ago • 7 comments

🐛 bug 描述

更新 pro-components2.3.12 版本后,控制台出现以下警告

image

© 版本信息

  • ProComponents : 2.3.12
  • umi : 4.0.21
  • antd : 4.23.2

amin168 avatar Sep 22 '22 09:09 amin168

+1

zcSkr avatar Sep 22 '22 09:09 zcSkr

就算修改为 children 还是会有这个警告。原因大概是因为这里: image

netcore-jroger avatar Sep 22 '22 10:09 netcore-jroger

原来是这里 https://github.com/umijs/route-utils/blob/master/src/transformRoute/transformRoute.ts#L141 看来得等 @umijs/route-utils 发新版了。

netcore-jroger avatar Sep 22 '22 15:09 netcore-jroger

+1

WillWuWeijie avatar Sep 23 '22 00:09 WillWuWeijie

用的umi4, pro-components升级到2.3.12后把路由routes改成chidren连项目都启动不起来

0fan avatar Sep 23 '22 02:09 0fan

用的umi4, pro-components升级到2.3.12后把路由routes改成chidren连项目都启动不起来

+1

WuJiY avatar Sep 23 '22 07:09 WuJiY

相同问题。 在 config/routes.ts 配置文件中使用 routes 来配置路由是正常可以编译运行的,但是浏览器访问的时候控制台提示警告信息,如果改为 children 则无法编译通过。

https://github.com/ant-design/ant-design-pro/issues/10258

@umijs/max 已安装版本: 4.0.21 @ant-design/pro-components 已安装版本: 2.3.10

houkunlin avatar Sep 26 '22 07:09 houkunlin

+1

lovewinders avatar Sep 27 '22 01:09 lovewinders

+1

xguan2014 avatar Sep 27 '22 05:09 xguan2014

+10086

hancens1024 avatar Sep 30 '22 09:09 hancens1024

+10010

Fiuck avatar Oct 01 '22 11:10 Fiuck

能靠谱稳定点嘛? 这些改动好随意的样子, 这些不是应该随意改的地方.

另外路由和菜单的文档说明是消失了? v1 都还写了下

bigzhu avatar Oct 06 '22 09:10 bigzhu

这种提示应该用 waring 而不是 error 吧, 还有改成 children 直接编译报错, 能不能不要这么激进,就算提示修改,也要修改后不出问题吧。

panhezeng avatar Oct 07 '22 10:10 panhezeng

遇到同样的问题

cxhcmc avatar Oct 07 '22 13:10 cxhcmc

同样的问题 +1

kaindy7633 avatar Oct 11 '22 08:10 kaindy7633

升级pro-components 到2.3.14依然存在

mushroomlb avatar Oct 11 '22 08:10 mushroomlb

升级pro-components 到2.3.16依然存在

liuzhaowei55 avatar Oct 12 '22 13:10 liuzhaowei55

+1

peterpanBest avatar Oct 13 '22 01:10 peterpanBest

+1 @chenshuai2144

hejinguo avatar Oct 13 '22 02:10 hejinguo

+1

rrge avatar Oct 13 '22 08:10 rrge

+1

xj89959853 avatar Oct 13 '22 09:10 xj89959853

我到处寻找解决方案,看来大家都遇到了

xj89959853 avatar Oct 13 '22 09:10 xj89959853

++++++11111,目前依然没有解决。。

jurieo avatar Oct 14 '22 02:10 jurieo

这个提示不会有任何问题,大家只要没有操作过 router 就不会有问题

chenshuai2144 avatar Oct 14 '22 05:10 chenshuai2144

@chenshuai2144 不知道你测试了没有,项目里面已经改成 children 了,但还是有这个提示。

netcore-jroger avatar Oct 14 '22 05:10 netcore-jroger

看到控制台的警告信息,强迫症有点受不了

houkunlin avatar Oct 14 '22 07:10 houkunlin

I encountered similar problem. Has anyone solved this problem yet?

vominhtrius avatar Oct 15 '22 06:10 vominhtrius

+1

peterpanBest avatar Oct 24 '22 09:10 peterpanBest

  '@ant-design/pro-components': 2.3.12_w5ozx5g45rrkuycam7gstefluy

我也遇到了。

请问,企业级还敢用吗?

zhangxinyong12 avatar Mar 23 '23 06:03 zhangxinyong12

2.4.2 已经没有这个问题了

"@ant-design/pro-components": "2.4.2", "antd": "5.3.2", "@umijs/max": "4.0.57", "umi-presets-pro": "2.0.3",

mashirozx avatar Mar 23 '23 06:03 mashirozx