曹睿
2025-04-24 5519cbf2e00c7ba4c650a542d98da99978124a30
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
<script setup lang="ts">
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
import { useThemeStore } from "@/store";
 
// 主题初始化
const themeStore = useThemeStore();
 
onLaunch(() => {
  console.log("App Launch");
  // 初始化主题
  themeStore.initTheme();
});
 
onShow(() => {
  console.log("App Show");
});
 
onHide(() => {
  console.log("App Hide");
});
</script>
 
<style lang="scss">
:root {
  --primary-color: #165dff;
  --primary-color-light: #94bfff;
  --primary-color-dark: #0e3c9b;
}
 
page {
  background: #f8f8f8;
}
</style>