We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在文件/src/routes/modules/system.ts中定义了一个对象来作为异步组件的映射
export default { 'views/system/permission/user': lazy(() => import('@/views/system/permission/user')), 'views/system/permission/menu': lazy(() => import('@/views/system/permission/menu')), 'views/system/permission/role': lazy(() => import('@/views/system/permission/role')), 'views/system/monitor/req-log': lazy(() => import('@/views/system/monitor/req-log')), 'views/system/monitor/online': lazy(() => import('@/views/system/monitor/online')), 'views/system/monitor/serve': lazy(() => import('@/views/system/monitor/serve')), 'views/system/monitor/login-log': lazy(() => import('@/views/system/monitor/login-log')), 'views/system/schedule/task': lazy(() => import('@/views/system/schedule/task')), 'views/system/schedule/log': lazy(() => import('@/views/system/schedule/log')) };
为什么不直接从import.meta.globEager('../../views/**/*.ts')中获取呢
import.meta.globEager('../../views/**/*.ts')
The text was updated successfully, but these errors were encountered:
感谢建议!确实以这种自动扫描导入的方式会更方便,当初这样做好像是为了显示控制那些菜单是可以被用户选择的,如下图: 如果用import.meta.globEager('../../views/**/*.ts')的话,就会无差别的导入了吧?当然我们可以选择性的过滤/匹配出实际需要的,嗯~这个后面有时间的话 可能会重构整个项目
Sorry, something went wrong.
No branches or pull requests
在文件/src/routes/modules/system.ts中定义了一个对象来作为异步组件的映射
为什么不直接从
import.meta.globEager('../../views/**/*.ts')
中获取呢The text was updated successfully, but these errors were encountered: