From d2d5fffe601492bb937990300764715ce7e40d1c Mon Sep 17 00:00:00 2001 From: lyt <1105290566@qq.com> Date: Thu, 1 Apr 2021 11:13:38 +0800 Subject: [PATCH] =?UTF-8?q?'admin-21.04.01:=E6=96=B0=E5=A2=9E=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E8=AF=AD=E8=A8=80=E5=88=87=E6=8D=A2=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E5=A4=8DkeepAlive=E5=88=B7=E6=96=B0=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=B8=8D=E9=87=8D=E6=96=B0=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E7=9A=84=E9=97=AE=E9=A2=98=E7=AD=89=E8=AF=B8=E5=A4=9A?= =?UTF-8?q?=E4=BC=98=E5=8C=96'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- package.json | 21 +- public/loading.css | 2 +- src/App.vue | 17 +- src/i18n/index.ts | 56 +++ src/i18n/lang/en.ts | 140 +++++++ src/i18n/lang/zh-cn.ts | 140 +++++++ src/i18n/lang/zh-tw.ts | 140 +++++++ src/i18n/pages/home/en.ts | 15 + src/i18n/pages/home/zh-cn.ts | 15 + src/i18n/pages/home/zh-tw.ts | 15 + src/i18n/pages/login/en.ts | 28 ++ src/i18n/pages/login/zh-cn.ts | 28 ++ src/i18n/pages/login/zh-tw.ts | 28 ++ src/main.ts | 4 +- src/router/index.ts | 149 +++---- src/store/interface/index.ts | 1 + src/store/modules/themeConfig.ts | 2 + src/theme/element.scss | 5 + src/utils/loading.ts | 22 +- src/utils/setIconfont.ts | 2 +- src/views/error/401.vue | 6 +- src/views/error/404.vue | 6 +- src/views/fun/clipboard/index.vue | 62 +++ src/views/fun/countup/index.vue | 2 +- src/views/fun/cropper/index.vue | 2 +- src/views/fun/echartsMap/index.vue | 248 ++++++------ src/views/fun/mindMap/index.vue | 2 +- src/views/fun/printJs/index.vue | 2 +- src/views/fun/qrcode/index.vue | 2 +- src/views/fun/selector/index.vue | 2 +- src/views/fun/tree/index.vue | 2 +- src/views/fun/wangEditor/index.vue | 2 +- src/views/home/index.vue | 16 +- src/views/layout/component/columnsAside.vue | 6 +- .../layout/navBars/breadcrumb/breadcrumb.vue | 4 +- .../layout/navBars/breadcrumb/search.vue | 4 +- .../layout/navBars/breadcrumb/setings.vue | 124 +++--- src/views/layout/navBars/breadcrumb/user.vue | 96 ++++- .../layout/navBars/breadcrumb/userNews.vue | 8 +- .../layout/navBars/tagsView/contextmenu.vue | 12 +- .../layout/navBars/tagsView/tagsView.vue | 2 +- src/views/layout/navMenu/horizontal.vue | 6 +- src/views/layout/navMenu/subItem.vue | 6 +- src/views/layout/navMenu/vertical.vue | 6 +- src/views/layout/routerView/parent.vue | 9 +- src/views/login/component/account.vue | 21 +- src/views/login/component/mobile.vue | 15 +- src/views/login/index.vue | 19 +- src/views/pages/awesome/index.vue | 2 +- src/views/pages/cityLinkage/index.vue | 2 +- src/views/pages/element/index.vue | 2 +- src/views/pages/filtering/details.vue | 2 +- src/views/pages/filtering/details1.vue | 2 +- src/views/pages/filtering/index.vue | 2 +- src/views/pages/formAdapt/index.vue | 2 +- src/views/pages/iocnfont/index.vue | 2 +- src/views/pages/listAdapt/index.vue | 2 +- src/views/pages/steps/index.vue | 2 +- src/views/pages/waterfall/index.vue | 2 +- src/views/system/menu/component/addMenu.vue | 188 ++++----- src/views/system/menu/component/editMenu.vue | 192 +++++---- src/views/system/menu/index.vue | 8 +- vite.config.ts | 21 +- yarn.lock | 366 +++++++++++------- 65 files changed, 1604 insertions(+), 717 deletions(-) create mode 100644 src/i18n/index.ts create mode 100644 src/i18n/lang/en.ts create mode 100644 src/i18n/lang/zh-cn.ts create mode 100644 src/i18n/lang/zh-tw.ts create mode 100644 src/i18n/pages/home/en.ts create mode 100644 src/i18n/pages/home/zh-cn.ts create mode 100644 src/i18n/pages/home/zh-tw.ts create mode 100644 src/i18n/pages/login/en.ts create mode 100644 src/i18n/pages/login/zh-cn.ts create mode 100644 src/i18n/pages/login/zh-tw.ts create mode 100644 src/views/fun/clipboard/index.vue diff --git a/README.md b/README.md index 160956a..7d1e290 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ cnpm run build 特别感谢群里老哥的建议、指导与帮忙,谢谢! - @省长 -- @唐参 +- @唐参 - @川歌 #### 其他事项 diff --git a/package.json b/package.json index b2ebea0..c52a136 100644 --- a/package.json +++ b/package.json @@ -7,14 +7,14 @@ "lint-fix": "eslint --fix --ext .js --ext .jsx --ext .vue src/" }, "dependencies": { - "@antv/g6": "^4.2.3", + "@antv/g6": "^4.2.5", "axios": "^0.21.1", "clipboard": "^2.0.8", "countup.js": "^2.0.7", "cropperjs": "^1.5.11", "echarts": "^5.0.2", "echarts-wordcloud": "^2.0.0", - "element-plus": "^1.0.2-beta.35", + "element-plus": "^1.0.2-beta.36", "mitt": "^2.1.0", "nprogress": "^0.2.0", "print-js": "^1.6.0", @@ -22,28 +22,29 @@ "screenfull": "^5.1.0", "sortablejs": "^1.13.0", "vue": "^3.0.5", + "vue-i18n": "^9.0.0", "vue-router": "^4.0.2", "vuex": "^4.0.0-rc.2", - "wangeditor": "^4.6.10" + "wangeditor": "^4.6.12" }, "devDependencies": { "@types/axios": "^0.14.0", "@types/clipboard": "^2.0.1", - "@types/node": "^14.14.35", + "@types/node": "^14.14.37", "@types/nprogress": "^0.2.0", "@types/sortablejs": "^1.10.6", - "@typescript-eslint/eslint-plugin": "^4.19.0", - "@typescript-eslint/parser": "^4.19.0", - "@vitejs/plugin-vue": "^1.1.5", - "@vue/compiler-sfc": "^3.0.7", + "@typescript-eslint/eslint-plugin": "^4.20.0", + "@typescript-eslint/parser": "^4.20.0", + "@vitejs/plugin-vue": "^1.2.1", + "@vue/compiler-sfc": "^3.0.10", "dotenv": "^8.2.0", - "eslint": "^7.22.0", + "eslint": "^7.23.0", "eslint-plugin-vue": "^7.8.0", "prettier": "^2.2.1", "sass": "^1.32.8", "sass-loader": "^11.0.1", "typescript": "^4.2.3", - "vite": "^2.1.2", + "vite": "^2.1.5", "vue-eslint-parser": "^7.6.0" } } diff --git a/public/loading.css b/public/loading.css index aa3370a..8280a21 100644 --- a/public/loading.css +++ b/public/loading.css @@ -1 +1 @@ -.loading-next{width:100%;height:100%;}.loading-next .loading-next-box{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);}.loading-next-box .loading-next-animation{position:relative;display:flex;width:100%;height:100%;justify-content:center;align-items:center;}.loading-next-animation .loading-next-animation-box{display:block;font-size:0;color:#fff;position:relative;width:64px;height:64px;}.loading-next-animation-box > div:nth-child(1){top:-25%;z-index:1;height:100%;border-radius:10%;animation:loading-animation 0.6s -0.1s linear infinite;background-color:#409eff;}@keyframes loading-animation{15%{border-bottom-right-radius:10%;}25%{transform:translateY(25%) rotate(22.5deg);}50%{border-bottom-right-radius:100%;transform:translateY(50%) scale(1,0.9) rotate(45deg);}75%{transform:translateY(25%) rotate(67.5deg);}100%{transform:translateY(0) rotate(90deg);}}.loading-next-animation-box > div:nth-child(2){height:10%;background:#000;border-radius:50%;opacity:0.2;animation:loading-next-animation-shadow 0.6s -0.1s linear infinite;position:absolute;left:0;width:100%;bottom:-40%;}@keyframes loading-next-animation-shadow{50%{transform:scale(1.25,1);}} \ No newline at end of file +.loading-next{width:100%;height:100%}.loading-next .loading-next-box{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.loading-next .loading-next-box-warp{width:80px;height:80px}.loading-next .loading-next-box-warp .loading-next-box-item{width:33.333333%;height:33.333333%;background-color:#409eff;float:left;animation:loading-next-animation 1.2s infinite ease;border-radius:1px}.loading-next .loading-next-box-warp .loading-next-box-item:nth-child(7){animation-delay:0s}.loading-next .loading-next-box-warp .loading-next-box-item:nth-child(4),.loading-next .loading-next-box-warp .loading-next-box-item:nth-child(8){animation-delay:.1s}.loading-next .loading-next-box-warp .loading-next-box-item:nth-child(1),.loading-next .loading-next-box-warp .loading-next-box-item:nth-child(5),.loading-next .loading-next-box-warp .loading-next-box-item:nth-child(9){animation-delay:.2s}.loading-next .loading-next-box-warp .loading-next-box-item:nth-child(2),.loading-next .loading-next-box-warp .loading-next-box-item:nth-child(6){animation-delay:.3s}.loading-next .loading-next-box-warp .loading-next-box-item:nth-child(3){animation-delay:.4s}@keyframes loading-next-animation{0%,70%,100%{transform:scale3D(1,1,1)}35%{transform:scale3D(0,0,1)}} \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index 64cc7e2..7a9e5eb 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,7 +5,9 @@ diff --git a/src/views/fun/countup/index.vue b/src/views/fun/countup/index.vue index b88c78d..a620806 100644 --- a/src/views/fun/countup/index.vue +++ b/src/views/fun/countup/index.vue @@ -35,7 +35,7 @@ import { reactive, toRefs, onMounted, nextTick } from 'vue'; import { CountUp } from 'countup.js'; export default { - name: 'countup', + name: 'funCountup', setup() { const state = reactive({ topCardItemList: [ diff --git a/src/views/fun/cropper/index.vue b/src/views/fun/cropper/index.vue index f6b450c..d1c3abf 100644 --- a/src/views/fun/cropper/index.vue +++ b/src/views/fun/cropper/index.vue @@ -22,7 +22,7 @@ import { ref, toRefs, reactive } from 'vue'; import CropperDialog from '/@/components/cropper/index.vue'; export default { - name: 'cropper', + name: 'funCropper', components: { CropperDialog }, setup() { const cropperDialogRef = ref(); diff --git a/src/views/fun/echartsMap/index.vue b/src/views/fun/echartsMap/index.vue index 181a717..ba80a1a 100644 --- a/src/views/fun/echartsMap/index.vue +++ b/src/views/fun/echartsMap/index.vue @@ -1,130 +1,130 @@ \ No newline at end of file + diff --git a/src/views/fun/mindMap/index.vue b/src/views/fun/mindMap/index.vue index 19f73a0..df85231 100644 --- a/src/views/fun/mindMap/index.vue +++ b/src/views/fun/mindMap/index.vue @@ -11,7 +11,7 @@ import { toRefs, reactive, computed, onMounted, getCurrentInstance } from 'vue'; import G6 from '@antv/g6'; import { useStore } from '/@/store/index.ts'; export default { - name: 'mindMap', + name: 'funMindMap', setup() { const { proxy } = getCurrentInstance() as any; const store = useStore(); diff --git a/src/views/fun/printJs/index.vue b/src/views/fun/printJs/index.vue index ad5e824..358a70f 100644 --- a/src/views/fun/printJs/index.vue +++ b/src/views/fun/printJs/index.vue @@ -16,7 +16,7 @@ import { reactive, toRefs } from 'vue'; import printJs from 'print-js'; export default { - name: 'printJs', + name: 'funPrintJs', setup() { const state = reactive({}); // 打印点击 diff --git a/src/views/fun/qrcode/index.vue b/src/views/fun/qrcode/index.vue index e07a2a4..2536aed 100644 --- a/src/views/fun/qrcode/index.vue +++ b/src/views/fun/qrcode/index.vue @@ -21,7 +21,7 @@ import { toRefs, reactive, onMounted, getCurrentInstance } from 'vue'; import QRCode from 'qrcodejs2-fixes'; export default { - name: 'qrcode', + name: 'funQrcode', setup() { const { proxy } = getCurrentInstance() as any; const state = reactive({ diff --git a/src/views/fun/selector/index.vue b/src/views/fun/selector/index.vue index 690a3b4..cca1365 100644 --- a/src/views/fun/selector/index.vue +++ b/src/views/fun/selector/index.vue @@ -13,7 +13,7 @@ import { toRefs, reactive } from 'vue'; import IconSelector from '/@/components/iconSelector/index.vue'; export default { - name: 'selector', + name: 'funSelector', components: { IconSelector }, setup() { const state = reactive({}); diff --git a/src/views/fun/tree/index.vue b/src/views/fun/tree/index.vue index 33ea7f0..2cea5c4 100644 --- a/src/views/fun/tree/index.vue +++ b/src/views/fun/tree/index.vue @@ -12,7 +12,7 @@ import * as echarts from 'echarts'; import { useStore } from '/@/store/index.ts'; import { echartsTreeList } from './mock.ts'; export default { - name: 'echartsTree', + name: 'funEchartsTree', setup() { const { proxy } = getCurrentInstance() as any; const store = useStore(); diff --git a/src/views/fun/wangEditor/index.vue b/src/views/fun/wangEditor/index.vue index dcd3ba0..d8aa7fb 100644 --- a/src/views/fun/wangEditor/index.vue +++ b/src/views/fun/wangEditor/index.vue @@ -16,7 +16,7 @@ import { toRefs, reactive, onMounted } from 'vue'; import wangeditor from 'wangeditor'; export default { - name: 'wangeditor', + name: 'funWangEditor', setup() { const state = reactive({}); // 初始化富文本 diff --git a/src/views/home/index.vue b/src/views/home/index.vue index f171648..a768b31 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -28,12 +28,12 @@ - +
- +
@@ -50,16 +50,16 @@ - + - - - + + + - +
@@ -85,7 +85,7 @@ - +
diff --git a/src/views/layout/component/columnsAside.vue b/src/views/layout/component/columnsAside.vue index 72e5790..6a0f7f1 100644 --- a/src/views/layout/component/columnsAside.vue +++ b/src/views/layout/component/columnsAside.vue @@ -12,19 +12,19 @@ } " :class="{ 'layout-columns-active': liIndex === k }" - :title="v.meta.title" + :title="$t(v.meta.title)" >
- {{ v.meta.title && v.meta.title.length >= 4 ? v.meta.title.substr(0, 4) : v.meta.title }} + {{ $t(v.meta.title) && $t(v.meta.title).length >= 4 ? $t(v.meta.title).substr(0, 4) : $t(v.meta.title) }}
diff --git a/src/views/layout/navBars/breadcrumb/breadcrumb.vue b/src/views/layout/navBars/breadcrumb/breadcrumb.vue index d765c6f..85e6258 100644 --- a/src/views/layout/navBars/breadcrumb/breadcrumb.vue +++ b/src/views/layout/navBars/breadcrumb/breadcrumb.vue @@ -9,10 +9,10 @@ - {{ v.meta.title }} + {{ $t(v.meta.title) }} - {{ v.meta.title }} + {{ $t(v.meta.title) }} diff --git a/src/views/layout/navBars/breadcrumb/search.vue b/src/views/layout/navBars/breadcrumb/search.vue index 02a708f..286cd2e 100644 --- a/src/views/layout/navBars/breadcrumb/search.vue +++ b/src/views/layout/navBars/breadcrumb/search.vue @@ -4,14 +4,14 @@ diff --git a/src/views/layout/navBars/breadcrumb/setings.vue b/src/views/layout/navBars/breadcrumb/setings.vue index 8e1d27c..1f50d72 100644 --- a/src/views/layout/navBars/breadcrumb/setings.vue +++ b/src/views/layout/navBars/breadcrumb/setings.vue @@ -1,9 +1,16 @@