diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..30e116c --- /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 73b2b9a..b4e6050 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 0000000..fa637f5 --- /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 fd8a41d..0000000 --- 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 ba8aa4e..af58119 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 b944aa8..56d89a0 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 06fcd1f..2161925 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 bef6ca8..5f2bfad 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 ad1279a..ecc55a0 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 35211bb..8c1a8aa 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({