From 0d42e17999bf3e8eeca2c3262b6b6606b6cabb47 Mon Sep 17 00:00:00 2001 From: icssoa <2570063477@qq.com> Date: Tue, 30 Mar 2021 18:23:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=20vite=20=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .browserslistrc | 3 - .eslintrc.js | 21 - .gitignore | 26 +- .prettierrc | 9 - README.md | 72 +- babel.config.js | 3 - index.html | 90 + package.json | 46 +- public/index.html | 17 - public/theme/black.css | 1 + public/theme/blue.css | 1 + public/theme/green.css | 1 + public/theme/purple.css | 1 + src/assets/css/element-variables.scss | 4 +- src/assets/css/index.scss | 4 +- src/config/env.ts | 15 +- src/cool/index.ts | 18 +- src/cool/modules/base/common/resize.ts | 2 +- src/cool/modules/base/common/theme.ts | 23 +- .../modules/base/components/avatar/index.vue | 16 +- .../base/components/codemirror/index.vue | 36 +- .../modules/base/components/dept/check.vue | 2 +- .../modules/base/components/dept/move.tsx | 4 +- .../modules/base/components/dept/tree.vue | 117 +- .../base/components/editor-quill/index.vue | 43 +- .../base/components/icon-svg/index.vue | 24 +- .../modules/base/components/menu/file.vue | 41 +- .../modules/base/components/menu/icons.vue | 2 +- .../modules/base/components/menu/perms.vue | 31 +- .../modules/base/components/menu/topbar.vue | 31 +- .../modules/base/components/menu/tree.vue | 2 +- .../modules/base/components/process/index.vue | 6 +- .../modules/base/components/role/perms.vue | 2 +- .../modules/base/components/role/select.vue | 2 +- .../base/components/route-nav/index.vue | 26 +- .../base/components/scrollbar/index.vue | 2 +- .../modules/base/directives/permission.ts | 2 +- .../modules/base/pages/error-page/403.vue | 2 +- .../modules/base/pages/error-page/404.vue | 2 +- .../modules/base/pages/error-page/500.vue | 2 +- .../modules/base/pages/error-page/502.vue | 2 +- .../error-page/components/error-page.vue | 2 +- src/cool/modules/base/pages/login/index.vue | 21 +- src/cool/modules/base/service/common.ts | 2 +- src/cool/modules/base/service/open.ts | 2 +- src/cool/modules/base/service/plugin/info.ts | 2 +- src/cool/modules/base/service/system/dept.ts | 2 +- src/cool/modules/base/service/system/log.ts | 2 +- src/cool/modules/base/service/system/menu.ts | 2 +- src/cool/modules/base/service/system/param.ts | 2 +- src/cool/modules/base/service/system/role.ts | 2 +- src/cool/modules/base/service/system/task.ts | 2 +- src/cool/modules/base/service/system/user.ts | 2 +- src/cool/modules/base/store/app.ts | 4 +- src/cool/modules/base/store/menu.ts | 24 +- src/cool/modules/base/store/user.ts | 4 +- src/cool/modules/base/views/info.vue | 22 +- src/cool/modules/base/views/log.vue | 4 +- src/cool/modules/base/views/menu.vue | 6 +- src/cool/modules/base/views/param.vue | 4 +- src/cool/modules/base/views/plugin.vue | 72 +- src/cool/modules/base/views/role.vue | 2 +- src/cool/modules/base/views/user.vue | 172 +- src/cool/modules/chat/components/chat.vue | 4 +- src/cool/modules/chat/components/input.vue | 60 +- src/cool/modules/chat/components/message.vue | 83 +- src/cool/modules/chat/components/notice.vue | 8 +- src/cool/modules/chat/components/session.vue | 4 +- src/cool/modules/chat/service/message.ts | 2 +- src/cool/modules/chat/service/session.ts | 2 +- src/cool/modules/chat/store/message.ts | 2 +- src/cool/modules/chat/store/session.ts | 2 +- src/cool/modules/chat/utils/index.ts | 2 +- .../{views => components}/crud/adv-search.vue | 2 +- .../crud/context-menu.vue | 2 +- .../{views => components}/crud/dialog.vue | 0 .../demo/{views => components}/crud/form.vue | 4 +- .../demo/{views => components}/crud/query.vue | 2 +- .../demo/{views => components}/crud/table.vue | 2 +- .../components => components/crud}/test.vue | 0 .../{views => components}/crud/upsert.vue | 2 +- .../demo}/b-cl-context-menu.vue | 0 .../demo}/b-cl-crud.vue | 0 .../demo}/b-cl-editor-quill.vue | 0 .../demo}/b-cl-upload.vue | 0 .../demo}/b-error-page.vue | 0 .../demo}/b-icon-svg.vue | 0 .../demo}/b-v-copy.vue | 0 .../demo/views/components/b-cl-form.vue | 142 - src/cool/modules/demo/views/crud.vue | 22 +- src/cool/modules/demo/views/demo.vue | 38 +- .../modules/task/components/cron/cron.vue | 234 +- src/cool/modules/task/service/info.ts | 2 +- src/cool/modules/task/views/task.vue | 6 +- src/cool/modules/theme/components/theme.vue | 65 +- src/cool/modules/upload/components/index.vue | 120 +- .../upload/components/space/category.vue | 2 +- .../modules/upload/components/space/index.vue | 96 +- src/cool/modules/upload/service/info.ts | 2 +- src/cool/modules/upload/service/type.ts | 2 +- src/core/index.ts | 4 +- src/core/service/base.ts | 4 +- src/core/service/desorator.ts | 6 +- src/core/set/module.ts | 51 +- src/core/set/router.ts | 22 +- src/core/set/service.ts | 83 +- src/core/utils/index.ts | 39 +- src/core/utils/storage.ts | 14 +- src/core/utils/svg.ts | 69 + src/crud/assets/index.scss | 3 +- src/crud/common/index.ts | 2 +- src/crud/components/add-btn.tsx | 2 +- src/crud/components/adv-btn.tsx | 2 +- src/crud/components/adv-search.tsx | 2 +- .../components/context-menu/context-menu.tsx | 2 +- src/crud/components/crud/helper.ts | 2 +- src/crud/components/crud/index.tsx | 2 +- src/crud/components/dialog/helper.ts | 37 +- src/crud/components/dialog/index.tsx | 2 +- src/crud/components/multi-delete-btn.tsx | 2 +- src/crud/components/pagination.tsx | 2 +- src/crud/components/query.tsx | 2 +- src/crud/components/refresh-btn.tsx | 2 +- src/crud/components/search-key.tsx | 2 +- src/crud/components/table/index.tsx | 4 +- src/crud/components/upsert/index.tsx | 2 +- src/crud/index.ts | 8 +- src/crud/types/crud.d.ts | 9 +- src/crud/types/op.d.ts | 5 +- src/crud/utils/vnode.tsx | 45 +- src/main.ts | 16 +- src/pages/layout/slider.vue | 9 +- src/pages/layout/topbar.vue | 31 +- src/router/index.ts | 18 +- src/service/request.ts | 8 +- src/shims-vue.d.ts | 70 +- src/views/home/components/hot-search.vue | 78 +- src/views/home/components/tab-chart.vue | 2 +- src/views/home/index.vue | 108 +- tsconfig.json | 20 +- vite.config.ts | 45 + vue.config.js | 113 - yarn-error.log | 2793 ++++++ yarn.lock | 8343 +---------------- 144 files changed, 4625 insertions(+), 9485 deletions(-) delete mode 100644 .browserslistrc delete mode 100644 .eslintrc.js delete mode 100644 .prettierrc delete mode 100644 babel.config.js create mode 100644 index.html delete mode 100644 public/index.html rename src/cool/modules/demo/{views => components}/crud/adv-search.vue (94%) rename src/cool/modules/demo/{views => components}/crud/context-menu.vue (97%) rename src/cool/modules/demo/{views => components}/crud/dialog.vue (100%) rename src/cool/modules/demo/{views => components}/crud/form.vue (98%) rename src/cool/modules/demo/{views => components}/crud/query.vue (89%) rename src/cool/modules/demo/{views => components}/crud/table.vue (95%) rename src/cool/modules/demo/{views/crud/components => components/crud}/test.vue (100%) rename src/cool/modules/demo/{views => components}/crud/upsert.vue (97%) rename src/cool/modules/demo/{views/components => components/demo}/b-cl-context-menu.vue (100%) rename src/cool/modules/demo/{views/components => components/demo}/b-cl-crud.vue (100%) rename src/cool/modules/demo/{views/components => components/demo}/b-cl-editor-quill.vue (100%) rename src/cool/modules/demo/{views/components => components/demo}/b-cl-upload.vue (100%) rename src/cool/modules/demo/{views/components => components/demo}/b-error-page.vue (100%) rename src/cool/modules/demo/{views/components => components/demo}/b-icon-svg.vue (100%) rename src/cool/modules/demo/{views/components => components/demo}/b-v-copy.vue (100%) delete mode 100644 src/cool/modules/demo/views/components/b-cl-form.vue create mode 100644 src/core/utils/svg.ts create mode 100644 vite.config.ts delete mode 100644 vue.config.js create mode 100644 yarn-error.log diff --git a/.browserslistrc b/.browserslistrc deleted file mode 100644 index 214388f..0000000 --- a/.browserslistrc +++ /dev/null @@ -1,3 +0,0 @@ -> 1% -last 2 versions -not dead diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index a2c2908..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,21 +0,0 @@ -module.exports = { - root: true, - env: { - node: true - }, - extends: [ - "plugin:vue/vue3-essential", - "eslint:recommended", - "@vue/typescript/recommended", - "@vue/prettier", - "@vue/prettier/@typescript-eslint" - ], - parserOptions: { - ecmaVersion: 2020 - }, - rules: { - "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", - "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", - "@typescript-eslint/no-explicit-any": ["off"] - } -}; diff --git a/.gitignore b/.gitignore index 403adbc..d451ff1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,23 +1,5 @@ -.DS_Store node_modules -/dist - - -# local env files -.env.local -.env.*.local - -# Log files -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* - -# Editor directories and files -.idea -.vscode -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? +.DS_Store +dist +dist-ssr +*.local diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index b82b0c6..0000000 --- a/.prettierrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "tabWidth": 4, - "useTabs": true, - "semi": true, - "jsxBracketSameLine": true, - "singleQuote": false, - "printWidth": 100, - "trailingComma": "none" -} diff --git a/README.md b/README.md index a45945a..a797a27 100644 --- a/README.md +++ b/README.md @@ -1,67 +1,27 @@ -

- cool-admin Logo -

+# Vue 3 + Typescript + Vite -

cool-admin 一个很酷的后台权限管理系统,开源免费,模块化、插件化、极速开发 CRUD,方便快速构建迭代后台管理系统, 到论坛 进一步了解

+This template should help get you started developing with Vue 3 and Typescript in Vite. -

- GitHub license - GitHub tag - GitHub tag -

+## Recommended IDE Setup -## 地址 +[VSCode](https://code.visualstudio.com/) + [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur). Make sure to enable `vetur.experimental.templateInterpolationService` in settings! -- [⚡️ vue2.x + element-ui(免费商用,支持 PC、平板、手机)](https://github.com/cool-team-official/cool-admin-vue) +### If Using ` + + diff --git a/package.json b/package.json index 3e3fd04..0d651be 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,10 @@ { - "name": "front-next-vue3", - "version": "0.1.2", - "private": true, + "name": "front-next-vue3-vite", + "version": "0.0.0", "scripts": { - "serve": "vue-cli-service serve", - "build": "vue-cli-service build", - "lint": "vue-cli-service lint" + "dev": "vite", + "build": "vue-tsc --noEmit && vite build", + "serve": "vite preview" }, "dependencies": { "array.prototype.flat": "^1.2.4", @@ -25,6 +24,7 @@ "quill": "^1.3.7", "socket.io-client": "^4.0.0", "store": "^2.0.12", + "uuid": "^8.3.2", "vue": "^3.0.9", "vue-echarts": "^6.0.0-rc.3", "vue-router": "^4.0.5", @@ -32,29 +32,15 @@ "vuex": "^4.0.0-0" }, "devDependencies": { - "@types/lodash": "^4.14.168", - "@typescript-eslint/eslint-plugin": "^2.33.0", - "@typescript-eslint/parser": "^2.33.0", - "@vue/cli-plugin-babel": "~4.5.0", - "@vue/cli-plugin-eslint": "~4.5.0", - "@vue/cli-plugin-router": "~4.5.0", - "@vue/cli-plugin-typescript": "~4.5.0", - "@vue/cli-plugin-vuex": "~4.5.0", - "@vue/cli-service": "~4.5.0", - "@vue/compiler-sfc": "^3.0.0", - "@vue/composition-api": "^1.0.0-rc.5", - "@vue/eslint-config-prettier": "^6.0.0", - "@vue/eslint-config-typescript": "^5.0.2", - "eslint": "^6.7.2", - "eslint-plugin-prettier": "^3.1.3", - "eslint-plugin-vue": "^7.0.0-0", - "hard-source-webpack-plugin": "^0.13.1", - "lint-staged": "^9.5.0", - "node-sass": "^4.12.0", - "prettier": "^1.19.1", - "sass-loader": "^8.0.2", + "@vitejs/plugin-vue": "^1.1.5", + "@vitejs/plugin-vue-jsx": "^1.1.2", + "@vue/compiler-sfc": "^3.0.5", + "sass": "^1.32.8", + "sass-loader": "^11.0.1", "svg-sprite-loader": "^6.0.2", - "typescript": "~3.9.3" - }, - "typings": "types/index.d.ts" + "typescript": "^4.1.3", + "vite": "^2.1.3", + "vite-svg-loader": "^1.5.1", + "vue-tsc": "^0.0.8" + } } diff --git a/public/index.html b/public/index.html deleted file mode 100644 index 3e5a139..0000000 --- a/public/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - <%= htmlWebpackPlugin.options.title %> - - - -
- - - diff --git a/public/theme/black.css b/public/theme/black.css index 0a6e37e..be956b7 100644 --- a/public/theme/black.css +++ b/public/theme/black.css @@ -1426,6 +1426,7 @@ margin: 0 3px; } .el-dropdown-menu { + position: absolute; top: 0; left: 0; padding: 10px 0; diff --git a/public/theme/blue.css b/public/theme/blue.css index 462237b..6e1bad6 100644 --- a/public/theme/blue.css +++ b/public/theme/blue.css @@ -1426,6 +1426,7 @@ margin: 0 3px; } .el-dropdown-menu { + position: absolute; top: 0; left: 0; padding: 10px 0; diff --git a/public/theme/green.css b/public/theme/green.css index d850530..39de631 100644 --- a/public/theme/green.css +++ b/public/theme/green.css @@ -1426,6 +1426,7 @@ margin: 0 3px; } .el-dropdown-menu { + position: absolute; top: 0; left: 0; padding: 10px 0; diff --git a/public/theme/purple.css b/public/theme/purple.css index aadf72e..376f11c 100644 --- a/public/theme/purple.css +++ b/public/theme/purple.css @@ -1426,6 +1426,7 @@ margin: 0 3px; } .el-dropdown-menu { + position: absolute; top: 0; left: 0; padding: 10px 0; diff --git a/src/assets/css/element-variables.scss b/src/assets/css/element-variables.scss index a4ee298..d165852 100644 --- a/src/assets/css/element-variables.scss +++ b/src/assets/css/element-variables.scss @@ -4,6 +4,6 @@ $--color-danger: $color-danger; $--color-warning: $color-warning; $--color-info: $color-info; -$--font-path: "~element-plus/lib/theme-chalk/fonts"; +$--font-path: "element-plus/lib/theme-chalk/fonts"; -@import "~element-plus/packages/theme-chalk/src/index"; +@import "element-plus/packages/theme-chalk/src/index"; diff --git a/src/assets/css/index.scss b/src/assets/css/index.scss index 1619837..68d7dfa 100644 --- a/src/assets/css/index.scss +++ b/src/assets/css/index.scss @@ -1,8 +1,8 @@ * { padding: 0; margin: 0; - font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", - "微软雅黑", Arial, sans-serif; + font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", + "Microsoft YaHei", "微软雅黑", Arial, sans-serif; } *::-webkit-scrollbar { diff --git a/src/config/env.ts b/src/config/env.ts index 006d8f0..7fcb3e0 100644 --- a/src/config/env.ts +++ b/src/config/env.ts @@ -1,18 +1,19 @@ import store from "store"; -import { getUrlParam } from "@/core/utils"; -import { MenuItem } from "@/cool/modules/base/types"; +import { getUrlParam } from "/@/core/utils"; +import { MenuItem } from "/@/cool/modules/base/types"; // 路由模式 const routerMode = "history"; // 开发模式 -const isDev: boolean = process.env.NODE_ENV == "development"; +const isDev: boolean = true; + // Host const host = "https://show.cool-admin.com"; // 请求地址 -const baseUrl: string = (function() { +const baseUrl: string = (function () { let proxy = getUrlParam("proxy"); if (proxy) { @@ -38,13 +39,13 @@ const app: any = store.get("__app__") || { showAMenu: false, // 是否显示一级菜单栏 showRouteNav: true, // 是否显示路由导航栏 showProcess: true, // 是否显示页面进程栏 - customMenu: false // 自定义菜单 + customMenu: false, // 自定义菜单 }, theme: { color: "", // 主题色 - url: "" // 主题样式地址 - } + url: "", // 主题样式地址 + }, }; // 自定义菜单列表 diff --git a/src/cool/index.ts b/src/cool/index.ts index fa1936d..2edce57 100644 --- a/src/cool/index.ts +++ b/src/cool/index.ts @@ -9,8 +9,8 @@ export default { name: "upload", options: { icon: "el-icon-picture", - text: "选择图片" - } + text: "选择图片", + }, }, { name: "crud", @@ -20,11 +20,11 @@ export default { dict: { sort: { prop: "order", - order: "sort" - } - } - } - } + order: "sort", + }, + }, + }, + }, }, // 客服聊天 "chat", @@ -35,6 +35,6 @@ export default { // 示例页 "demo", // 主题切换 - "theme" - ] + "theme", + ], }; diff --git a/src/cool/modules/base/common/resize.ts b/src/cool/modules/base/common/resize.ts index c36a6cd..2b0823f 100644 --- a/src/cool/modules/base/common/resize.ts +++ b/src/cool/modules/base/common/resize.ts @@ -1,4 +1,4 @@ -import store from "@/store"; +import store from "/@/store"; const lock: any = { menuCollapse: null, diff --git a/src/cool/modules/base/common/theme.ts b/src/cool/modules/base/common/theme.ts index 0c9196c..6b4959d 100644 --- a/src/cool/modules/base/common/theme.ts +++ b/src/cool/modules/base/common/theme.ts @@ -1,6 +1,6 @@ -import { iconfontUrl, app } from "@/config/env"; +import { iconfontUrl, app } from "/@/config/env"; +import { basename } from "/@/core/utils"; import { createLink } from "../utils"; -import { colorPrimary } from "@/assets/css/common.scss"; // 主题初始化 @@ -13,7 +13,7 @@ if (app.theme) { document .getElementsByTagName("body")[0] - .style.setProperty("--color-primary", color || colorPrimary); + .style.setProperty("--color-primary", color); } // 字体图标库加载 @@ -24,17 +24,16 @@ if (iconfontUrl) { // svg 图标加载 -const req = require.context("@/icons/svg/", false, /\.svg$/); - -req.keys().map(req); +const svgFiles = import.meta.globEager("/src/icons/svg/**/*.svg"); function iconList() { - return req - .keys() - .map(req) - .map((e: any) => e.default.id) - .filter(e => e.includes("icon")) - .sort(); + let list: string[] = []; + + for (const i in svgFiles) { + list.push(basename(i).replace(".svg", "")); + } + + return list; } export { iconList }; diff --git a/src/cool/modules/base/components/avatar/index.vue b/src/cool/modules/base/components/avatar/index.vue index 8486b48..dd06389 100644 --- a/src/cool/modules/base/components/avatar/index.vue +++ b/src/cool/modules/base/components/avatar/index.vue @@ -12,7 +12,7 @@ @@ -83,7 +83,7 @@ export default defineComponent({ height: 100%; width: 100%; - :deep(.image-slot) { + .image-slot { display: flex; justify-content: center; align-items: center; diff --git a/src/cool/modules/base/components/codemirror/index.vue b/src/cool/modules/base/components/codemirror/index.vue index d97a389..717a134 100644 --- a/src/cool/modules/base/components/codemirror/index.vue +++ b/src/cool/modules/base/components/codemirror/index.vue @@ -1,6 +1,11 @@ @@ -22,7 +27,7 @@ export default defineComponent({ modelValue: null, height: String, width: String, - options: Object + options: Object, }, emits: ["update:modelValue", "load"], @@ -56,18 +61,21 @@ export default defineComponent({ } ); - onMounted(function() { + onMounted(function () { nextTick(() => { // 实例化 - editor = CodeMirror.fromTextArea(editorRef.value.querySelector("#editor"), { - mode: "javascript", - theme: "ambiance", - styleActiveLine: true, - lineNumbers: true, - lineWrapping: true, - indentUnit: 4, - ...props.options - }); + editor = CodeMirror.fromTextArea( + editorRef.value.querySelector("#editor"), + { + mode: "javascript", + theme: "ambiance", + styleActiveLine: true, + lineNumbers: true, + lineWrapping: true, + indentUnit: 4, + ...props.options, + } + ); // 输入监听 editor.on("change", (e: any) => { @@ -97,9 +105,9 @@ export default defineComponent({ }); return { - editorRef + editorRef, }; - } + }, }); diff --git a/src/cool/modules/base/components/dept/check.vue b/src/cool/modules/base/components/dept/check.vue index 29274a8..44aec61 100644 --- a/src/cool/modules/base/components/dept/check.vue +++ b/src/cool/modules/base/components/dept/check.vue @@ -35,7 +35,7 @@ - diff --git a/src/cool/modules/demo/views/crud.vue b/src/cool/modules/demo/views/crud.vue index 5c02e1d..a57b5e0 100644 --- a/src/cool/modules/demo/views/crud.vue +++ b/src/cool/modules/demo/views/crud.vue @@ -30,15 +30,15 @@ diff --git a/src/cool/modules/demo/views/demo.vue b/src/cool/modules/demo/views/demo.vue index a952012..d53550b 100644 --- a/src/cool/modules/demo/views/demo.vue +++ b/src/cool/modules/demo/views/demo.vue @@ -1,22 +1,28 @@ - diff --git a/src/cool/modules/task/components/cron/cron.vue b/src/cool/modules/task/components/cron/cron.vue index 1584d37..900aca6 100644 --- a/src/cool/modules/task/components/cron/cron.vue +++ b/src/cool/modules/task/components/cron/cron.vue @@ -2,7 +2,9 @@
- +
{{ @@ -29,12 +31,22 @@ - {{ text.Seconds.specific }} - - {{ - val - 1 - }} + + {{ val - 1 }} @@ -90,12 +102,22 @@ - {{ text.Minutes.specific }} - - {{ - val - 1 - }} + + {{ val - 1 }} @@ -121,7 +143,9 @@
- +
{{ @@ -148,12 +172,22 @@ - {{ text.Hours.specific }} - - {{ - val - 1 - }} + + {{ val - 1 }} @@ -179,10 +213,14 @@
- +
- {{ text.Day.every }} + {{ + text.Day.every + }} {{ text.Day.intervalWeek[1] }} - + {{ text.Day.specificWeek }} - + @@ -242,10 +295,17 @@ {{ text.Day.specificDay }} - - {{ - val - }} + + {{ val }} @@ -262,7 +322,10 @@ {{ text.Day.lastWeek[0] }} - + - {{ text.Month.specific }} - + - +
{{ @@ -411,7 +483,10 @@ - {{ text.Year.specific }} { + this.second.specificSpecific.forEach((val) => { seconds += val + ","; }); seconds = seconds.slice(0, -1); break; case "4": - seconds = this.second.rangeStart + "-" + this.second.rangeEnd; + seconds = + this.second.rangeStart + "-" + this.second.rangeEnd; break; } return seconds; @@ -586,16 +665,20 @@ export default { minutes = "*"; break; case "2": - minutes = this.minute.incrementStart + "/" + this.minute.incrementIncrement; + minutes = + this.minute.incrementStart + + "/" + + this.minute.incrementIncrement; break; case "3": - this.minute.specificSpecific.forEach(val => { + this.minute.specificSpecific.forEach((val) => { minutes += val + ","; }); minutes = minutes.slice(0, -1); break; case "4": - minutes = this.minute.rangeStart + "-" + this.minute.rangeEnd; + minutes = + this.minute.rangeStart + "-" + this.minute.rangeEnd; break; } return minutes; @@ -608,10 +691,13 @@ export default { hours = "*"; break; case "2": - hours = this.hour.incrementStart + "/" + this.hour.incrementIncrement; + hours = + this.hour.incrementStart + + "/" + + this.hour.incrementIncrement; break; case "3": - this.hour.specificSpecific.forEach(val => { + this.hour.specificSpecific.forEach((val) => { hours += val + ","; }); hours = hours.slice(0, -1); @@ -634,10 +720,13 @@ export default { days = "?"; break; case "3": - days = this.day.incrementStart + "/" + this.day.incrementIncrement; + days = + this.day.incrementStart + + "/" + + this.day.incrementIncrement; break; case "5": - this.day.specificSpecific.forEach(val => { + this.day.specificSpecific.forEach((val) => { days += val + ","; }); days = days.slice(0, -1); @@ -670,10 +759,13 @@ export default { weeks = "?"; break; case "2": - weeks = this.week.incrementStart + "/" + this.week.incrementIncrement; + weeks = + this.week.incrementStart + + "/" + + this.week.incrementIncrement; break; case "4": - this.week.specificSpecific.forEach(val => { + this.week.specificSpecific.forEach((val) => { weeks += val + ","; }); weeks = weeks.slice(0, -1); @@ -686,7 +778,8 @@ export default { weeks = "?"; break; case "11": - weeks = this.week.cronNthDayDay + "#" + this.week.cronNthDayNth; + weeks = + this.week.cronNthDayDay + "#" + this.week.cronNthDayNth; break; } return weeks; @@ -699,10 +792,13 @@ export default { months = "*"; break; case "2": - months = this.month.incrementStart + "/" + this.month.incrementIncrement; + months = + this.month.incrementStart + + "/" + + this.month.incrementIncrement; break; case "3": - this.month.specificSpecific.forEach(val => { + this.month.specificSpecific.forEach((val) => { months += val + ","; }); months = months.slice(0, -1); @@ -721,10 +817,13 @@ export default { years = "*"; break; case "2": - years = this.year.incrementStart + "/" + this.year.incrementIncrement; + years = + this.year.incrementStart + + "/" + + this.year.incrementIncrement; break; case "3": - this.year.specificSpecific.forEach(val => { + this.year.specificSpecific.forEach((val) => { years += val + ","; }); years = years.slice(0, -1); @@ -736,11 +835,12 @@ export default { return years; }, cron() { - return `${this.secondsText || "*"} ${this.minutesText || "*"} ${this.hoursText || - "*"} ${this.daysText || "*"} ${this.monthsText || "*"} ${this.weeksText || "?"} ${ - this.showYear ? this.yearsText || "*" : "" - }`; - } + return `${this.secondsText || "*"} ${this.minutesText || "*"} ${ + this.hoursText || "*" + } ${this.daysText || "*"} ${this.monthsText || "*"} ${ + this.weeksText || "?" + } ${this.showYear ? this.yearsText || "*" : ""}`; + }, }, methods: { @@ -769,8 +869,8 @@ export default { } } } - } - } + }, + }, }; diff --git a/src/cool/modules/task/service/info.ts b/src/cool/modules/task/service/info.ts index 3847c57..1b9bb16 100644 --- a/src/cool/modules/task/service/info.ts +++ b/src/cool/modules/task/service/info.ts @@ -1,4 +1,4 @@ -import { BaseService, Service, Permission } from "@/core"; +import { BaseService, Service, Permission } from "/@/core"; @Service("task/info") class SysTask extends BaseService { diff --git a/src/cool/modules/task/views/task.vue b/src/cool/modules/task/views/task.vue index f4840bd..21ee4ba 100644 --- a/src/cool/modules/task/views/task.vue +++ b/src/cool/modules/task/views/task.vue @@ -217,10 +217,10 @@ import { computed, defineComponent, inject, onMounted, reactive } from "vue"; import { ElMessage, ElMessageBox } from "element-plus"; import Draggable from "vuedraggable"; -import { checkPerm } from "@/cool/modules/base"; -import { ContextMenu } from "@/crud"; +import { checkPerm } from "/@/cool/modules/base"; +import { ContextMenu } from "/@/crud"; import Cron from "../components/cron"; -import { useRefs } from "@/core"; +import { useRefs } from "/@/core"; export default defineComponent({ name: "task", diff --git a/src/cool/modules/theme/components/theme.vue b/src/cool/modules/theme/components/theme.vue index d1b9887..2d5e708 100644 --- a/src/cool/modules/theme/components/theme.vue +++ b/src/cool/modules/theme/components/theme.vue @@ -19,7 +19,7 @@ >
  • @@ -38,15 +38,24 @@
    • 显示一级菜单栏 - +
    • 显示路由导航栏 - +
    • 显示页面进程栏 - +
  • @@ -82,7 +91,7 @@ title="修改说明" width="800px" :props="{ - 'append-to-body': true + 'append-to-body': true, }" >
      @@ -102,50 +111,50 @@ - - -