App.vue
899 Bytes
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
<script setup lang="ts">
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
onLaunch(() => {
// 静态页面模式,不做登录校验
});
onShow(() => {
// App Show
});
onHide(() => {
// App Hide
});
</script>
<style>
/* 主题色 - :root 确保 H5 等环境下 var(--theme-primary) 可用 */
:root {
--theme-primary: #1F3A8A;
--theme-primary-dark: #142a6c;
--theme-primary-light: #e8ecf5;
--theme-primary-shadow: rgba(31, 58, 138, 0.35);
--theme-primary-shadow-light: rgba(31, 58, 138, 0.2);
}
page {
background: #f9fafb;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
color: #111827;
overflow-x: hidden;
overflow-x: clip;
width: 100%;
max-width: 100vw;
}
/* H5 移动端防横向溢出 */
html, body, #app {
overflow-x: hidden;
overflow-x: clip;
width: 100%;
max-width: 100vw;
}
</style>