1.问题描述

There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on afilesystem
 with other case-semantic.Use equal casing. Compare these module identifiers:
routes: [
            {
              path: '/DataUpload/product',
              name: 'productupload',
              icon: 'bars',
              component: './DataUpload/ProductUpload', //当采用大写引用时,出现警告
            },
            {
              path: '/dataupload/orderstatus',
              name: 'orderstatusupload',
              icon: 'pie-chart',
              component: './DataUpload/orderstatusupload',
            }

Ant Design Pro 路由配置中 component 属性中名称大小写问题

2.解决办法


 routes: [
            {
              path: '/DataUpload/product',
              name: 'productupload',
              icon: 'bars',
              component: './DataUpload/productupload', //修改为小写后,编译正常
            },
            {
              path: '/dataupload/orderstatus',
              name: 'orderstatusupload',
              icon: 'pie-chart',
              component: './DataUpload/orderstatusupload',
            }

Ant Design Pro 路由配置中 component 属性中名称大小写问题
目录结构中的引用文件采用驼峰命名风格


思考:Ant Design Pro Routes配置中对于风格的约定,欢迎大神拍砖

相关文章:

  • 2021-04-01
  • 2022-01-16
  • 2021-07-17
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
猜你喜欢
  • 2021-10-03
  • 2021-04-13
  • 2022-03-05
  • 2021-07-22
  • 2021-10-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案