App.vue
1.83 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<template>
<router-view />
</template>
<script setup>
import { nextTick, onMounted, watch} from 'vue'
import { handleThemeStyle } from '@/utils/theme'
import useSettingsStore from '@/store/modules/settings'
import ResetPwd from '@/views/system/user/profile/components/resetPwd'
import useUserStore from '@/store/modules/user'
import { getCurrentInstance } from '@vue/runtime-core'
import {useStorage} from "@vueuse/core";
const userStore = useUserStore()
const { proxy } = getCurrentInstance()
const language= useStorage('language',0)
onMounted(() => {
document.body.style.setProperty('--el-color-primary', '#453DEA')
document.body.style.setProperty('--el-color-primary-light-3', '#8623FC')
document.body.style.setProperty('--el-button-hover-bg-color', '#fff')
nextTick(() => {
// 初始化主题样式
handleThemeStyle(useSettingsStore().theme)
})
})
watch(language,(val)=>{
location.reload()
})
// watch(() => userStore.user?.changePassFlag, (val) => {
// if (val === '1') {
// proxy.$modal.confirm('密码长期未更新,请及时更新').then(() => {
// proxy.$refs['resetPwdRef'].open()
// })
// }
// })
</script>
<style lang="scss">
:root {
--el-color-golden: #946A12;
--el-fill-color-light: #faf5f5;
--el-button-hover-border-color: #94080B;
--el-button-hover-bg-color: rgba(148, 8, 11, 0.3);
--el-fill-color-lighter: #F6F9FE!important;
}
.box {
width: 1600px;
margin: auto;
}
@media screen and (max-width: 1650px) {
.box {
width: 1200px;
}
}
@media screen and (max-width: 1200px) {
.box {
width: 860px;
}
}
@media screen and (max-width: 900px) {
.box {
width: 750px;
}
}
@font-face {
font-family: 'YouSheBiaoTiHei';
src: url("@/assets/fonts/YouSheBiaoTiHei-2.ttf");
}
@font-face {
font-family: 'DIN Alternate';
src: url("@/assets/fonts/DIN Alternate Bold.ttf");
}
</style>