diff --git a/bin/core/createNewPage.js b/bin/core/createNewPage.js index a4fa0d6c2014e97a0821a871878c0ed128d76f52..6f0c82f49b2076a3ed416f6704e995676c0dcb9d 100644 --- a/bin/core/createNewPage.js +++ b/bin/core/createNewPage.js @@ -3,7 +3,7 @@ const inquirer = require('inquirer'); const fs = require('fs'); const path = require('path'); const shell = require('shelljs'); - +const fg = require('fast-glob'); /** * 页面基础路径 @@ -14,12 +14,9 @@ const basePath = path.join(__dirname, '../../src/views'); */ shell.cd(basePath); /** - * 过滤固定路由 + * 获取现有页面目录名数组 */ -const dirs = fs.readdirSync('./') - .filter((temp) => !['404.vue', 'dashboard', 'login'].includes(temp)) - .filter((temp) => fs.statSync(temp).isDirectory()); - +const dirs = fg.sync('*', { onlyDirectories: true, ignore: ['base'] }); /** * 保证文件名全局唯一 * @param {*} file_name diff --git a/bin/core/createNewTemplate.js b/bin/core/createNewTemplate.js index 92a5514625e5b48a511940a33859d1a514066ff2..1f2ac2de27f52f1c4ffa1309faf6f9656fa4ce84 100644 --- a/bin/core/createNewTemplate.js +++ b/bin/core/createNewTemplate.js @@ -18,7 +18,7 @@ const checkName = (file_name) => { /** * 获取现有的所有名称 */ - const namesArr = Object.keys(jsonData); +const namesArr = Object.keys(jsonData); return namesArr.includes(file_name); }; /** diff --git a/mock/Controller/LoginHandler.ts b/mock/Controller/LoginHandler.ts index bf2a5c71798441e0050a84392d3de4d6e3bb7265..5f7a572ded732cccd23c50c587873d142bb8659a 100644 --- a/mock/Controller/LoginHandler.ts +++ b/mock/Controller/LoginHandler.ts @@ -1,7 +1,7 @@ /* * @Author: zhangyang * @Date: 2021-08-26 15:34:41 - * @LastEditTime: 2021-11-28 14:07:49 + * @LastEditTime: 2022-02-26 16:10:32 * @Description: 登录相关 */ import { MockApi } from "../decorator/MockApi"; @@ -217,29 +217,6 @@ export class LoginController { part: [] } ] - }, - { - autoid: 4, - is_show: 0, - node_desc: '测试', - node_name: '自动创建测试', - node_path: '', - node_sort: 0, - node_type: 1, - parent_id: 0, - part: [ - { - autoid: 41, - is_show: 1, - node_desc: '自动创建测试', - node_name: '自动创建测试', - node_path: '10000/21', - node_sort: 0, - node_type: 2, - parent_id: 4, - part: [] - } - ] } ] }); diff --git a/package.json b/package.json index 8ff3d2eef612dff5e02da43c320c157d3ee0fb06..dbf890570afd9b7e9a6de6654afa6892286e1aff 100644 --- a/package.json +++ b/package.json @@ -22,51 +22,51 @@ "dependencies": { "@element-plus/icons": "^0.0.11", "@tweenjs/tween.js": "^18.6.4", - "@vueuse/core": "^7.4.1", - "axios": "^0.24.0", - "core-js": "^3.20.1", - "element-plus": "^1.2.0-beta.6", + "@vueuse/core": "^7.6.2", + "axios": "^0.26.0", + "core-js": "^3.21.1", + "element-plus": "^2.0.2", "file-saver": "^2.0.5", - "highlight.js": "^11.3.1", + "highlight.js": "^11.4.0", "js-cookie": "^3.0.1", "md5": "^2.3.0", "moment": "^2.29.1", "normalize.css": "^8.0.1", - "nprogress": "^0.2.0", + "pinia": "^2.0.11", "regenerator-runtime": "^0.13.9", - "vue": "^3.2.26", + "vue": "^3.2.31", "vue-router": "^4.0.12", "wangeditor": "^4.7.11", - "xlsx": "^0.17.4" + "xlsx": "^0.18.2" }, "devDependencies": { - "@iconify/json": "^1.1.447", - "@types/file-saver": "^2.0.4", + "@iconify/json": "^2.1.6", + "@types/file-saver": "^2.0.5", "@types/js-cookie": "^3.0.1", - "@types/md5": "^2.3.1", - "@types/mockjs": "^1.0.4", + "@types/md5": "^2.3.2", + "@types/mockjs": "^1.0.6", "@types/node": "^16.3.3", - "@types/nprogress": "^0.2.0", - "@vitejs/plugin-legacy": "^1.6.4", - "@vitejs/plugin-vue": "^2.0.1", - "@vitejs/plugin-vue-jsx": "^1.3.3", - "@vue/compiler-sfc": "^3.2.26", - "autoprefixer": "^10.4.0", - "commander": "^8.3.0", + "@vitejs/plugin-legacy": "^1.7.1", + "@vitejs/plugin-vue": "^2.2.2", + "@vitejs/plugin-vue-jsx": "^1.3.7", + "@vue/compiler-sfc": "^3.2.31", + "autoprefixer": "^10.4.2", + "commander": "^9.0.0", "cross-env": "^7.0.3", + "fast-glob": "^3.2.11", "inquirer": "^8.2.0", "mockjs": "^1.1.0", - "sass": "^1.45.1", - "shelljs": "^0.8.4", - "typescript": "^4.5.4", - "unplugin-auto-import": "^0.5.4", - "unplugin-icons": "^0.12.23", - "unplugin-vue-components": "^0.17.10", - "vite": "2.7.6", + "sass": "^1.49.8", + "shelljs": "^0.8.5", + "typescript": "^4.5.5", + "unplugin-auto-import": "^0.6.1", + "unplugin-icons": "^0.13.2", + "unplugin-vue-components": "^0.17.20", + "vite": "2.8.4", "vite-plugin-optimize-persist": "^0.1.2", "vite-plugin-package-config": "^0.1.1", - "vite-plugin-windicss": "^1.6.1", - "windicss": "^3.4.0" + "vite-plugin-windicss": "^1.7.1", + "windicss": "^3.4.4" }, "keywords": [ "vue3", @@ -123,7 +123,7 @@ "js-cookie", "md5", "moment", - "nprogress", + "pinia", "regenerator-runtime/runtime", "vue", "vue-router", diff --git a/src/@types/route.d.ts b/src/@types/route.d.ts index d8c8844be0564884668803a3a0de55b09492c4d9..48b78ff68658dd91bdecd2a31a7560853b3957f7 100644 --- a/src/@types/route.d.ts +++ b/src/@types/route.d.ts @@ -1,9 +1,14 @@ /* * @Author: zhangyang * @Date: 2021-07-14 15:02:58 - * @LastEditTime: 2021-07-14 15:09:42 + * @LastEditTime: 2022-01-09 17:07:37 * @Description: 路由相关 */ + +type YoungRouteItem = { + name: string; + title: string; +}; interface YoungRoute { path: string; name: string; @@ -18,5 +23,4 @@ interface YoungRoute { component?: any; redirect?: string; children?: YoungRoute[]; - hidden?: boolean; } diff --git a/src/App.vue b/src/App.vue index fc4e28775f1458114dc87c132f420bdd1f9ac3cc..d527dd61cb92fe9e7457f71eb2cde0108b07cb4b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,11 +1,11 @@ diff --git a/src/auto-imports.d.ts b/src/auto-imports.d.ts index f73aa3de1a376c4f7a967721651c790003399257..d5aaac44b5f0e52a2da87a0b032f89d27da770d5 100644 --- a/src/auto-imports.d.ts +++ b/src/auto-imports.d.ts @@ -50,6 +50,7 @@ declare global { const unref: typeof import('vue')['unref'] const useAttrs: typeof import('vue')['useAttrs'] const useCssModule: typeof import('vue')['useCssModule'] + const useCssVars: typeof import('vue')['useCssVars'] const useRoute: typeof import('vue-router')['useRoute'] const useRouter: typeof import('vue-router')['useRouter'] const useSlots: typeof import('vue')['useSlots'] diff --git a/src/components/YoungDialog/index.vue b/src/components/YoungDialog/index.vue index fad322ddd42616110d2c1e745911fd9a612b9493..49ec48a948dd14d779444236522d2dfdc1e8a2c9 100644 --- a/src/components/YoungDialog/index.vue +++ b/src/components/YoungDialog/index.vue @@ -1,7 +1,7 @@