代码拉取完成,页面将自动刷新
<template>
<el-config-provider :locale="locale" :size="config.size" :zIndex="config.zIndex" :button="config.button">
<router-view></router-view>
</el-config-provider>
<!-- <router-view /> -->
</template>
<script setup lang="ts">
import { useColor } from '@/utils/color'
import { computed, onMounted, reactive } from 'vue';
import i18n from '@/locales/index'
import {useGlobarStore} from './store/modules/globalStore';
const store = useGlobarStore()
const { lighten } = useColor()
onMounted(() => {
const app_color = store.GetColor
if (app_color) {
document.documentElement.style.setProperty('--el-color-primary', app_color);
for (let i = 1; i <= 9; i++) {
document.documentElement.style.setProperty(`--el-color-primary-light-${i}`, lighten(app_color, i / 10));
}
for (let i = 1; i <= 9; i++) {
document.documentElement.style.setProperty(`--el-color-primary-dark-${i}`, lighten(app_color, i / 10));
}
}
})
const config = reactive({
size: "default",
zIndex: 2000,
button: {
autoInsertSpace: false
}
})
const locale = computed(() => i18n.global.messages[i18n.global.locale].el)
</script>
<style lang="scss" scoped>
</style>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。