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) +