同步操作将从 zuohuaijun/Admin.NET 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<template><el-config-provider :size="getGlobalComponentSize" :locale="getGlobalI18n"><router-view v-show="setLockScreen" /><LockScreen v-if="themeConfig.isLockScreen" /><Setings ref="setingsRef" v-show="setLockScreen" /><CloseFull v-if="!themeConfig.isLockScreen" /><Upgrade v-if="needUpdate" /><!-- <Sponsors /> --></el-config-provider></template><script setup lang="ts" name="app">import { defineAsyncComponent, computed, ref, onBeforeMount, onMounted, onUnmounted, nextTick, watch } from 'vue';import { useRoute } from 'vue-router';import { useI18n } from 'vue-i18n';import { storeToRefs } from 'pinia';import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';import { useThemeConfig } from '/@/stores/themeConfig';import other from '/@/utils/other';import { Local, Session } from '/@/utils/storage';import mittBus from '/@/utils/mitt';import setIntroduction from '/@/utils/setIconfont';import checkUpdate from '/@/utils/auto-update';// 引入组件const LockScreen = defineAsyncComponent(() => import('/@/layout/lockScreen/index.vue'));const Setings = defineAsyncComponent(() => import('/@/layout/navBars/topBar/setings.vue'));const CloseFull = defineAsyncComponent(() => import('/@/layout/navBars/topBar/closeFull.vue'));const Upgrade = defineAsyncComponent(() => import('/@/layout/upgrade/index.vue'));// const Sponsors = defineAsyncComponent(() => import('/@/layout/sponsors/index.vue'));// 定义变量内容const { messages, locale } = useI18n();const setingsRef = ref();const route = useRoute();const stores = useTagsViewRoutes();const storesThemeConfig = useThemeConfig();const { themeConfig } = storeToRefs(storesThemeConfig);const needUpdate = ref(false);// 设置锁屏时组件显示隐藏const setLockScreen = computed(() => {// 防止锁屏后,刷新出现不相关界面// https://gitee.com/lyt-top/vue-next-admin/issues/I6AF8Preturn themeConfig.value.isLockScreen ? themeConfig.value.lockScreenTime > 1 : themeConfig.value.lockScreenTime >= 0;});// // 获取版本号// const getVersion = computed(() => {// let isVersion = false;// if (route.path !== '/login') {// // @ts-ignore// if ((Local.get('version') && Local.get('version') !== __NEXT_VERSION__) || !Local.get('version')) isVersion = true;// }// return isVersion;// });checkUpdate(() => {needUpdate.value = true;}, 60000);// 获取全局组件大小const getGlobalComponentSize = computed(() => {return other.globalComponentSize();});// 获取全局 i18nconst getGlobalI18n = computed(() => {return messages.value[locale.value];});// 设置初始化,防止刷新时恢复默认onBeforeMount(() => {// 设置批量第三方 icon 图标setIntroduction.cssCdn();// 设置批量第三方 jssetIntroduction.jsCdn();});// 页面加载时onMounted(() => {nextTick(() => {// 监听布局配'置弹窗点击打开mittBus.on('openSetingsDrawer', () => {setingsRef.value.openDrawer();});// 获取缓存中的布局配置if (Local.get('themeConfig')) {storesThemeConfig.setThemeConfig({ themeConfig: Local.get('themeConfig') });document.documentElement.style.cssText = Local.get('themeConfigStyle');}// 获取缓存中的全屏配置if (Session.get('isTagsViewCurrenFull')) {stores.setCurrenFullscreen(Session.get('isTagsViewCurrenFull'));}});});// 页面销毁时,关闭监听布局配置/i18n监听onUnmounted(() => {mittBus.off('openSetingsDrawer', () => {});});// 监听路由的变化,设置网站标题watch(() => route.path,() => {other.useTitle();},{deep: true,});</script>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。