mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat: 完成代码生成模板(1.0)
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { createTextVNode, defineComponent } from 'vue';
|
||||
import { createTextVNode, defineComponent, onMounted } from 'vue';
|
||||
import { useDialog, useLoadingBar, useMessage, useNotification } from 'naive-ui';
|
||||
import useContentLoading from '@/hooks/common/loading';
|
||||
import { initWebSocket } from '@/utils/websocket';
|
||||
import { initSSE } from '@/utils/sse';
|
||||
|
||||
defineOptions({
|
||||
name: 'AppProvider'
|
||||
@ -25,6 +27,12 @@ const ContextHolder = defineComponent({
|
||||
return () => createTextVNode();
|
||||
}
|
||||
});
|
||||
|
||||
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>
|
||||
|
Reference in New Issue
Block a user