mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 11:26:45 +08:00
评估接口+课程部分
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
const routes = [];
|
||||
const context = require.context('@/views', true, /\.vue$/, 'lazy');
|
||||
context.keys().forEach(path => {
|
||||
// console.log('path', path)
|
||||
const componentName = path.replace(/.*\/([^\\.\\/]*)\.vue$/, '$1');
|
||||
routes.push({
|
||||
path: `/${componentName.toLowerCase()}`,
|
||||
name: componentName,
|
||||
component: () => context(path),
|
||||
meta: {
|
||||
isLink: true
|
||||
}
|
||||
});
|
||||
const context = require.context("@/views", true, /\.vue$/, "lazy");
|
||||
context.keys().forEach((path) => {
|
||||
// console.log('path', path)
|
||||
const componentName = path.replace(/.*\/([^\\.\\/]*)\.vue$/, "$1");
|
||||
routes.push({
|
||||
path: `/${componentName.toLowerCase()}/:id?`,
|
||||
name: componentName,
|
||||
component: () => context(path),
|
||||
meta: {
|
||||
isLink: true,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
export default routes;
|
||||
export default routes;
|
||||
|
||||
Reference in New Issue
Block a user