自动注册路由配置

C:\0_RG\Code\rg3-cli\src\router\index.use.bs.js


    case "smdcm":
         componentsContextOwner = require.context('@/views/smdcm/', true, /.vue/)
         break;

components组件自动注册

C:\0_RG\Code\rg3-cli\src\components\used.js

       case "smdcm":
                lstComponentsContext.push({
                    path: '@/components/smdcm/',
                    component: require.context('@/components/smdcm/', true, /.vue/)
                });

views组件自动注册

C:\0_RG\Code\rg3-cli\src\components\used.js

 case "smdcm":
                lstComponentsContext.push({
                    path: '@/views/smdcm/',
                    component: require.context('@/views/smdcm/', true, /.vue/)
                });
                break;

文档更新时间: 2023-04-06 20:53   作者:admin