lis8.0-vue3/src/App.vue

37 lines
791 B
Vue
Raw Normal View History

2025-05-08 15:37:28 +08:00
<template>
2025-10-29 09:41:21 +08:00
<router-view />
2025-05-08 15:37:28 +08:00
</template>
<script setup>
import useSettingsStore from '@/store/modules/settings'
import { handleThemeStyle } from '@/utils/theme'
2025-10-28 17:22:53 +08:00
import { ref, onMounted, onUnmounted, nextTick } from 'vue';
2025-11-20 18:17:09 +08:00
import { useFingerprint } from '@/utils/useFingerprint';
import { useCommonStore } from '@/store/modules/commonStore'
const mbStore = useCommonStore();
// 使用自定义hook获取指纹信息
const {
fingerprint,
loading,
error,
getFingerprint
} = useFingerprint();
2025-10-28 17:22:53 +08:00
2025-05-08 15:37:28 +08:00
onMounted(() => {
nextTick(() => {
// 初始化主题样式
handleThemeStyle(useSettingsStore().theme)
})
2025-11-20 18:17:09 +08:00
if (!mbStore.fingerprint) {
// 重新获取指纹
getFingerprint();
mbStore.setFingerprint(fingerprint)
}
2025-05-08 15:37:28 +08:00
})
2025-10-28 17:22:53 +08:00
2025-10-29 18:02:33 +08:00
</script>
2025-10-28 17:22:53 +08:00
2025-10-29 18:02:33 +08:00
<style lang="scss" scoped></style>