Files
ruoyi-plus-vben5/apps/web-antd/src/app.vue
dap 0636c5f4a6 chore: 移除开发环境的上传提示功能
该提示用于提醒从低版本升级到后端5.4.0+的用户执行升级SQL,现已不再需要。删除相关钩子函数及导入,简化应用初始化逻辑。
2026-01-27 20:15:58 +08:00

53 lines
1.1 KiB
Vue

<script lang="ts" setup>
import { computed } from 'vue';
import { useAntdDesignTokens } from '@vben/hooks';
import { preferences, usePreferences } from '@vben/preferences';
import { App, ConfigProvider, theme } from 'antdv-next';
import { antdLocale } from '#/locales';
import { PopupContext } from './utils/context';
defineOptions({ name: 'App' });
const { isDark } = usePreferences();
const { tokens } = useAntdDesignTokens();
const tokenTheme = computed(() => {
const algorithm = isDark.value
? [theme.darkAlgorithm]
: [theme.defaultAlgorithm];
// antd 紧凑模式算法
if (preferences.app.compact) {
algorithm.push(theme.compactAlgorithm);
}
return {
algorithm,
token: tokens,
};
});
</script>
<template>
<ConfigProvider :locale="antdLocale" :theme="tokenTheme">
<App>
<RouterView />
<PopupContext />
</App>
</ConfigProvider>
</template>
<style lang="scss">
body {
/**
* 全局启用 抗锯齿字体
* @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/font-smooth
*/
@apply antialiased;
}
</style>