From 8786a54136bc251f7ed4c4ef5e208c75ac02c263 Mon Sep 17 00:00:00 2001 From: wmn <1525968046@qq.com> Date: Sat, 14 May 2022 23:46:12 +0800 Subject: [PATCH] =?UTF-8?q?:add=20=E6=A0=B7=E5=BC=8F=E6=94=B9=E7=89=88?= =?UTF-8?q?=EF=BC=9BGrasscuttersWebDashboard=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 2 +- src/App.vue | 11 +- src/components.d.ts | 7 + src/components/Header/index.vue | 16 ++- src/pages/consoled/index.vue | 60 ++++++++ src/pages/index.vue | 2 +- src/pages/login/index.vue | 114 ++++++++++++--- src/pages/start/components/holyrelic.vue | 2 +- src/pages/start/components/personnel.vue | 51 +++++++ src/pages/start/components/startnav.vue | 90 +++++++++--- src/pages/start/components/thing.vue | 3 +- src/pages/start/index.vue | 2 +- src/pages/start/style.less | 24 +--- src/router/index.ts | 65 ++++++++- src/router/root.ts | 6 +- src/store/modules/app/index.ts | 175 ++++++++++++++++++++++- src/store/modules/app/types.ts | 1 + src/utils/http/axios/index.ts | 2 +- 18 files changed, 548 insertions(+), 85 deletions(-) create mode 100644 src/pages/consoled/index.vue create mode 100644 src/pages/start/components/personnel.vue diff --git a/.vscode/settings.json b/.vscode/settings.json index afbac62..d00872d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -91,7 +91,7 @@ "source.fixAll.eslint": true, "source.fixAll.stylelint": true }, - "editor.defaultFormatter": "octref.vetur" + "editor.defaultFormatter": "Vue.volar" }, "i18n-ally.localesPaths": ["src/locales/lang"], "i18n-ally.keystyle": "nested", diff --git a/src/App.vue b/src/App.vue index dc79892..4996e9b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,7 +5,7 @@ import { title } from 'process' import { useAppStore } from './store/modules/app' -import { ref, watch } from 'vue' +import { ref, watch,onMounted } from 'vue' import { darkTheme } from 'naive-ui' const appStore = useAppStore() const apptheme = ref() @@ -45,6 +45,13 @@ watch( immediate: true, }, ) + +onMounted(() => { + const WSS = localStorage.getItem("WSS") + if (WSS) { + appStore.socketConnect(WSS) + } +}) diff --git a/src/components.d.ts b/src/components.d.ts index 4ffb267..f97efdd 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -8,9 +8,16 @@ declare module '@vue/runtime-core' { AButton: typeof import('@arco-design/web-vue')['Button'] ACascader: typeof import('@arco-design/web-vue')['Cascader'] ACheckbox: typeof import('@arco-design/web-vue')['Checkbox'] + ADescriptions: typeof import('@arco-design/web-vue')['Descriptions'] AInput: typeof import('@arco-design/web-vue')['Input'] AInputNumber: typeof import('@arco-design/web-vue')['InputNumber'] + ALink: typeof import('@arco-design/web-vue')['Link'] + AMenu: typeof import('@arco-design/web-vue')['Menu'] + AMenuItem: typeof import('@arco-design/web-vue')['MenuItem'] ASelect: typeof import('@arco-design/web-vue')['Select'] + ASubMenu: typeof import('@arco-design/web-vue')['SubMenu'] + ATable: typeof import('@arco-design/web-vue')['Table'] + ATableColumn: typeof import('@arco-design/web-vue')['TableColumn'] ATooltip: typeof import('@arco-design/web-vue')['Tooltip'] Footer: typeof import('./components/footer/index.vue')['default'] Header: typeof import('./components/Header/index.vue')['default'] diff --git a/src/components/Header/index.vue b/src/components/Header/index.vue index ec0ef79..e25021f 100644 --- a/src/components/Header/index.vue +++ b/src/components/Header/index.vue @@ -7,8 +7,7 @@ import { ref } from 'vue' import { useDark, useToggle } from '@vueuse/core'; import { useAppStore, useUserStore } from '@/store'; import { IconMoonFill, IconSunFill } from '@arco-design/web-vue/es/icon'; - - +import { IconClockCircle } from '@arco-design/web-vue/es/icon'; const title = ref('I want to study typescript') // 检测浏览器系统主题 const darkThemeMq = window.matchMedia('(prefers-color-scheme: dark)') @@ -40,6 +39,9 @@ const ThemeChange = (val: string | number | boolean) => { document.documentElement.classList.remove('dark') } } + +const LoginHS = ref(true) +