-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathApp.vue
More file actions
47 lines (42 loc) · 1.05 KB
/
App.vue
File metadata and controls
47 lines (42 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<template>
<Layout>
<!-- 使用 slot 渲染页面内容 -->
<router-view />
</Layout>
<!-- 全局Toast组件 -->
<GlobalToast />
<!-- 全局悬浮iframe组件 -->
<FloatingIframe
:default-url="'http://localhost:5757/apps/websocket'"
:default-position="{ x: 33, y: 604 }"
:default-size="{ width: 419, height: 883 }"
button-title="打开浮窗浏览器"
window-title="浮窗浏览器"
/>
</template>
<script>
import { onMounted } from 'vue';
import Layout from './components/Layout.vue';
import GlobalToast from './components/GlobalToast.vue';
import FloatingIframe from './components/FloatingIframe.vue';
import { useVisitedStore } from './stores/visitedStore';
export default {
name: 'App',
components: {
Layout,
GlobalToast,
FloatingIframe,
},
setup() {
const visitedStore = useVisitedStore();
// 应用启动时加载访问记录
onMounted(() => {
visitedStore.loadFromStorage();
});
return {};
}
};
</script>
<style>
/* 你可以在这里写一些全局样式 */
</style>