feat: 完成代码生成模板(1.0)

This commit is contained in:
xlsea
2024-09-08 21:47:56 +08:00
parent 2e0b16d0b3
commit ff3ed20bba
13 changed files with 474 additions and 40 deletions

View File

@ -1,11 +1,9 @@
<script setup lang="ts">
import { computed, defineAsyncComponent, onMounted } from 'vue';
import { computed, defineAsyncComponent } from 'vue';
import { AdminLayout, LAYOUT_SCROLL_EL_ID } from '@sa/materials';
import type { LayoutMode } from '@sa/materials';
import { useAppStore } from '@/store/modules/app';
import { useThemeStore } from '@/store/modules/theme';
import { initWebSocket } from '@/utils/websocket';
import { initSSE } from '@/utils/sse';
import GlobalHeader from '../modules/global-header/index.vue';
import GlobalSider from '../modules/global-sider/index.vue';
import GlobalTab from '../modules/global-tab/index.vue';
@ -102,12 +100,6 @@ function getSiderCollapsedWidth() {
return w;
}
onMounted(() => {
const protocol = window.location.protocol === 'https:' ? 'wss://' : 'ws://';
initWebSocket(`${protocol + window.location.host + import.meta.env.VITE_APP_BASE_API}/resource/websocket`);
initSSE(`${import.meta.env.VITE_APP_BASE_API}/resource/sse`);
});
</script>
<template>