mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2025-06-16 05:59:16 +08:00
add: add some info
This commit is contained in:
parent
cec5166970
commit
028892daa9
5
.npmignore
Normal file
5
.npmignore
Normal file
@ -0,0 +1,5 @@
|
||||
node_modules/
|
||||
dist/
|
||||
yarn.lock
|
||||
yarn-error.log
|
||||
visualizer.html
|
@ -85,7 +85,7 @@
|
||||
"vue-tsc": "^1.0.9"
|
||||
},
|
||||
"description": "<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->",
|
||||
"main": "index.js",
|
||||
"main": "index.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/XiaoDaiGua-Ray/xiaodaigua-ray.github.io.git"
|
||||
@ -99,6 +99,9 @@
|
||||
"admin template",
|
||||
"中后台模板"
|
||||
],
|
||||
"files": [
|
||||
"**/*"
|
||||
],
|
||||
"author": "Ray",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
|
@ -28,6 +28,11 @@ import type { AppRouteRecordRaw, RouteModules } from '@/router/type'
|
||||
* @returns 所有路由模块
|
||||
*
|
||||
* @remark 自动合并所有路由模块, 每一个 ts 文件都视为一个 route module 与 views 一一对应
|
||||
*
|
||||
* 请注意, 如果更改了 modules 的目录位置或者该方法的位置, 需要同步更改 import.meta.glob 方法的路径
|
||||
* 该方法会以本文件为起始位置去查找对应 URL 目录的资源
|
||||
*
|
||||
* 会将 modules 中每一个 ts 文件当作一个路由模块, 即使你以分包的形式创建了路由模块
|
||||
*/
|
||||
export const combineRawRouteModules = () => {
|
||||
const modulesFiles: RouteModules = import.meta.glob('../modules/**/*.ts', {
|
||||
|
Loading…
x
Reference in New Issue
Block a user