From 3418f44be4965b86f09326d1d0887d04ff5c71b0 Mon Sep 17 00:00:00 2001 From: xiaoxian521 <1923740402@qq.com> Date: Wed, 5 Jan 2022 14:17:06 +0800 Subject: [PATCH] release: update 2.8.0 --- .vscode/extensions.json | 11 ++ .vscode/settings.json | 27 +++-- ...ode-snippets => vue3.0.code-snippets.json} | 0 .vscode/vue3.2+.setup-snippets.json | 17 +++ .vscode/vue3.2.setup-snippets | 20 ---- index.html | 104 +++--------------- mock/asyncRoutes.ts | 12 +- package.json | 6 +- pnpm-lock.yaml | 27 ++--- public/serverConfig.json | 6 +- src/layout/components/appMain.vue | 20 ++-- src/layout/components/navbar.vue | 35 +++--- src/layout/components/screenfull/index.vue | 4 +- src/layout/components/setting/index.vue | 95 ++++++++-------- src/layout/components/sidebar/breadCrumb.vue | 2 +- src/layout/components/sidebar/horizontal.vue | 34 +++--- src/layout/components/sidebar/sidebarItem.vue | 84 +++++++++----- src/layout/components/sidebar/vertical.vue | 6 +- src/layout/components/tag/index.scss | 1 - src/layout/components/tag/index.vue | 50 +++++---- src/layout/index.vue | 18 ++- src/layout/types.ts | 4 +- src/plugins/element-plus/index.ts | 22 +++- src/plugins/i18n/config.ts | 98 ++--------------- src/plugins/i18n/en/buttons.ts | 21 ++++ src/plugins/i18n/en/menus.ts | 38 +++++++ src/plugins/i18n/index.ts | 55 +++++++-- src/plugins/i18n/zh-CN/buttons.ts | 21 ++++ src/plugins/i18n/zh-CN/menus.ts | 38 +++++++ src/router/index.ts | 3 +- src/router/modules/error.ts | 7 +- src/router/modules/externalLink.ts | 5 +- src/router/modules/home.ts | 4 +- src/router/modules/remaining.ts | 5 +- src/router/utils.ts | 6 +- src/store/modules/app.ts | 18 +-- src/store/modules/epTheme.ts | 9 +- src/store/modules/multiTags.ts | 8 +- src/store/modules/user.ts | 4 +- src/utils/storage/responsive.ts | 12 +- types/global.d.ts | 4 + 41 files changed, 543 insertions(+), 418 deletions(-) create mode 100644 .vscode/extensions.json rename .vscode/{vue3.0.code-snippets => vue3.0.code-snippets.json} (100%) create mode 100644 .vscode/vue3.2+.setup-snippets.json delete mode 100644 .vscode/vue3.2.setup-snippets create mode 100644 src/plugins/i18n/en/buttons.ts create mode 100644 src/plugins/i18n/en/menus.ts create mode 100644 src/plugins/i18n/zh-CN/buttons.ts create mode 100644 src/plugins/i18n/zh-CN/menus.ts diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..30e116cf6 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,11 @@ +{ + "recommendations": [ + "stylelint.vscode-stylelint", + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "johnsoncodehk.volar", + "lokalise.i18n-ally", + "mikestead.dotenv", + "antfu.iconify" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 73b2b9a1b..b4e6050c8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,14 @@ { - // You should install these plugins: - // ESLint - // Prettier - Code formatter - // stylelint - // vscode-icons - // TypeScript Vue Plugin (Volar) - // Vue Language Features (Volar) + /** 你需要安装这些插件,以便带来更好的提示体验 + * ESLint + * Prettier - Code formatter + * stylelint + * vscode-icons + * i18n Ally + * Iconify IntelliSense + * TypeScript Vue Plugin (Volar) + * Vue Language Features (Volar) + */ "terminal.integrated.rendererType": "dom", "editor.formatOnType": true, "editor.formatOnSave": true, @@ -45,5 +48,13 @@ }, "volar.tsPlugin": true, "typescript.tsdk": "node_modules/typescript/lib", - "i18n-ally.localesPaths": ["src/plugins/i18n"] + "i18n-ally.localesPaths": ["src/plugins/i18n"], + "i18n-ally.keystyle": "nested", + "i18n-ally.sortKeys": true, + "i18n-ally.namespace": true, + "i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}", + "i18n-ally.enabledParsers": ["ts"], + "i18n-ally.sourceLanguage": "en", + "i18n-ally.displayLanguage": "zh-CN", + "i18n-ally.enabledFrameworks": ["vue", "react"] } diff --git a/.vscode/vue3.0.code-snippets b/.vscode/vue3.0.code-snippets.json similarity index 100% rename from .vscode/vue3.0.code-snippets rename to .vscode/vue3.0.code-snippets.json diff --git a/.vscode/vue3.2+.setup-snippets.json b/.vscode/vue3.2+.setup-snippets.json new file mode 100644 index 000000000..fa637f574 --- /dev/null +++ b/.vscode/vue3.2+.setup-snippets.json @@ -0,0 +1,17 @@ +{ + "Vue3.2+快速生成模板": { + "prefix": "Vue3.2+", + "body": [ + "\n", + "\n", + "", + "$2" + ], + "description": "Vue3.2+" + } +} diff --git a/.vscode/vue3.2.setup-snippets b/.vscode/vue3.2.setup-snippets deleted file mode 100644 index fd8a41d8a..000000000 --- a/.vscode/vue3.2.setup-snippets +++ /dev/null @@ -1,20 +0,0 @@ -{ - "Vue3.2快速生成模板": { - "prefix": "Vue3.2", - "body": [ - "", - "\n", - "\n", - "" - ], - "description": "Vue3.2" - } -} diff --git a/index.html b/index.html index ba8aa4ee4..af581196e 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ - vue-pure-admin + pure-admin-thin @@ -14,106 +14,36 @@
-
-

Pure-Admin

- -
+

Loading

- diff --git a/mock/asyncRoutes.ts b/mock/asyncRoutes.ts index b944aa81d..56d89a03e 100644 --- a/mock/asyncRoutes.ts +++ b/mock/asyncRoutes.ts @@ -4,9 +4,9 @@ import { MockMethod } from "vite-plugin-mock"; const permissionRouter = { path: "/permission", name: "permission", - redirect: "/permission/page", + redirect: "/permission/page/index", meta: { - title: "message.permission", + title: "menus.permission", icon: "Lollipop", i18n: true, showLink: true, @@ -14,19 +14,19 @@ const permissionRouter = { }, children: [ { - path: "/permission/page", + path: "/permission/page/index", name: "permissionPage", meta: { - title: "message.permissionPage", + title: "menus.permissionPage", i18n: true, showLink: true } }, { - path: "/permission/button", + path: "/permission/button/index", name: "permissionButton", meta: { - title: "message.permissionButton", + title: "menus.permissionButton", i18n: true, showLink: true, authority: [] diff --git a/package.json b/package.json index 06fcd1f5a..2161925f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "vue-pure-admin", - "version": "2.6.0", + "name": "pure-admin-thin", + "version": "2.8.0", "private": true, "engines": { "node": ">= 16", @@ -40,7 +40,7 @@ "axios": "^0.21.1", "css-color-function": "^1.3.3", "dayjs": "^1.10.7", - "element-plus": "1.2.0-beta.6", + "element-plus": "1.3.0-beta.1", "element-resize-detector": "^1.2.3", "font-awesome": "^4.7.0", "js-cookie": "^3.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bef6ca8c0..5f2bfadaa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,7 +32,7 @@ specifiers: cross-env: 7.0.3 css-color-function: ^1.3.3 dayjs: ^1.10.7 - element-plus: 1.2.0-beta.6 + element-plus: 1.3.0-beta.1 element-resize-detector: ^1.2.3 eslint: 7.30.0 eslint-plugin-prettier: 3.4.0 @@ -88,7 +88,7 @@ dependencies: axios: 0.21.4 css-color-function: 1.3.3 dayjs: 1.10.7 - element-plus: 1.2.0-beta.6_vue@3.2.24 + element-plus: 1.3.0-beta.1_vue@3.2.24 element-resize-detector: 1.2.3 font-awesome: 4.7.0 js-cookie: 3.0.1 @@ -938,10 +938,10 @@ packages: fastq: 1.13.0 dev: true - /@popperjs/core/2.11.0: + /@popperjs/core/2.11.2: resolution: { - integrity: sha512-zrsUxjLOKAzdewIDRWy9nsV1GQsKBCWaGwsZQlCgr6/q+vjyZhFgqedLfFBuI9anTPEUT4APq9Mu0SZBTzIcGQ== + integrity: sha512-92FRmppjjqz29VMJ2dn+xdyXZBrMlE42AV6Kq6BwjWV7CNUW1hs2FtxSNLQE+gJhaZ6AAmYuO9y8dshhcBl7vA== } dev: false @@ -1514,10 +1514,10 @@ packages: vue-demi: 0.12.1_vue@3.2.24 dev: false - /@vueuse/core/7.2.2_vue@3.2.24: + /@vueuse/core/7.5.1_vue@3.2.24: resolution: { - integrity: sha512-T9oksrPflNhsgG/Y/7IeCSmITPZ0VKDnTpK8y7SQl4ZIdLIL8L7fJyhJEgSMWyo497j/XK3RKFkOTh4GFTVeIQ== + integrity: sha512-GczfdTWqH483zkUHdDYiLm0Tn51OtsQXYc+eBKKIeolh0mgn682KbSYmkrjNytaF7qGc74YxMDAYjkPBW6V2Pg== } peerDependencies: "@vue/composition-api": ^1.1.0 @@ -1528,7 +1528,7 @@ packages: vue: optional: true dependencies: - "@vueuse/shared": 7.2.2_vue@3.2.24 + "@vueuse/shared": 7.5.1_vue@3.2.24 vue: 3.2.24 vue-demi: 0.12.1_vue@3.2.24 dev: false @@ -1569,10 +1569,10 @@ packages: vue-demi: 0.12.1_vue@3.2.24 dev: false - /@vueuse/shared/7.2.2_vue@3.2.24: + /@vueuse/shared/7.5.1_vue@3.2.24: resolution: { - integrity: sha512-9vevEvvQgx4snSrDfZ5BFd7FmlIl9rwTtr8ySzPZhZQslx6lbcsXK3Q97I06Fv8S2TedR//X9fn2QbNtbFmdog== + integrity: sha512-zMQEuYJyTmr5Hj2rYgSbb4H/cSI8mdaa9dUuw20j6rPV+xLV11y7vCyIkxo31uODDr0p77FMlProKzNDiK9rAA== } peerDependencies: "@vue/composition-api": ^1.1.0 @@ -2831,17 +2831,18 @@ packages: } dev: true - /element-plus/1.2.0-beta.6_vue@3.2.24: + /element-plus/1.3.0-beta.1_vue@3.2.24: resolution: { - integrity: sha512-8EdSIR/5/FHcSB8w1diAh+gJMHgxIvxuZoayY99k6taAR1QyEFHuPTgFccZLopJ1+iP4UEsZFz49l57qS08Utw== + integrity: sha512-q3vMaKElPpuSTeIF7kuDmMOE+N1YVCCIG3fshXpz6qgjnxPbgZumVM0qGfhr8DTu9JxRbBoDok49dqtX/BWn3w== } peerDependencies: vue: ^3.2.0 dependencies: + "@ctrl/tinycolor": 3.4.0 "@element-plus/icons-vue": 0.2.4_vue@3.2.24 - "@popperjs/core": 2.11.0 - "@vueuse/core": 7.2.2_vue@3.2.24 + "@popperjs/core": 2.11.2 + "@vueuse/core": 7.5.1_vue@3.2.24 async-validator: 4.0.7 dayjs: 1.10.7 lodash: 4.17.21 diff --git a/public/serverConfig.json b/public/serverConfig.json index ad1279a84..ecc55a0f3 100644 --- a/public/serverConfig.json +++ b/public/serverConfig.json @@ -1,5 +1,5 @@ { - "Version": "2.6.0", + "Version": "2.8.0", "Title": "PureAdmin", "FixedHeader": true, "HiddenSideBar": false, @@ -12,6 +12,10 @@ "Grey": false, "Weak": false, "HideTabs": false, + "SidebarStatus": true, + "EpThemeColor": "#409EFF", + "ShowLogo": true, + "ShowModel": "smart", "MapConfigure": { "amapKey": "97b3248d1553172e81f168cf94ea667e", "options": { diff --git a/src/layout/components/appMain.vue b/src/layout/components/appMain.vue index 35211bbf6..8c1a8aa0a 100644 --- a/src/layout/components/appMain.vue +++ b/src/layout/components/appMain.vue @@ -27,12 +27,23 @@ const transitions = computed(() => { }); const hideTabs = computed(() => { - return instance?.sets.hideTabs; + return instance?.configure.hideTabs; }); + const layout = computed(() => { return instance?.layout.layout === "vertical"; }); +const getSectionStyle = computed(() => { + return [ + hideTabs.value && layout ? "padding-top: 48px;" : "", + !hideTabs.value && layout ? "padding-top: 85px;" : "", + hideTabs.value && !layout.value ? "padding-top: 48px" : "", + !hideTabs.value && !layout.value ? "padding-top: 85px;" : "", + props.fixedHeader ? "" : "padding-top: 0;" + ]; +}); + const transitionMain = defineComponent({ render() { return h( @@ -71,12 +82,7 @@ const transitionMain = defineComponent({