remove: 移除vben多余配置

This commit is contained in:
2026-08-18 13:36:58 +08:00
parent 8c78f5730e
commit 754ba31471
6 changed files with 16 additions and 15 deletions
@@ -14,19 +14,6 @@
<!-- 由 vite 注入 VITE_APP_TITLE 变量,在 .env 文件内配置 --> <!-- 由 vite 注入 VITE_APP_TITLE 变量,在 .env 文件内配置 -->
<title><%= VITE_APP_TITLE %></title> <title><%= VITE_APP_TITLE %></title>
<link rel="icon" href="/cd-logo.png" type="image/png" /> <link rel="icon" href="/cd-logo.png" type="image/png" />
<script>
// 生产环境下注入百度统计
if (window._VBEN_ADMIN_PRO_APP_CONF_) {
var _hmt = _hmt || [];
(function () {
var hm = document.createElement('script');
hm.src =
'https://hm.baidu.com/hm.js?b38e689f40558f20a9a686d7f6f33edf';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s);
})();
}
</script>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
@@ -13,6 +13,7 @@ const logo = computed(() => preferences.logo.source);
<template> <template>
<AuthPageLayout <AuthPageLayout
:app-name="appName" :app-name="appName"
:copyright="false"
:logo="logo" :logo="logo"
:page-description="$t('authentication.pageDesc')" :page-description="$t('authentication.pageDesc')"
:page-title="$t('authentication.pageTitle')" :page-title="$t('authentication.pageTitle')"
@@ -12,6 +12,12 @@ export const overridesPreferences = defineOverridesPreferences({
accessMode: 'backend', // 启用后端访问控制模式 accessMode: 'backend', // 启用后端访问控制模式
enableRefreshToken: true, // 启用token自动刷新功能 🔄 enableRefreshToken: true, // 启用token自动刷新功能 🔄
defaultHomePath: '/welcome', // 设置默认首页路由 defaultHomePath: '/welcome', // 设置默认首页路由
defaultAvatar: '/cd-logo.png',
},
copyright: {
enable: false,
companyName: '',
companySiteLink: '',
}, },
navigation: { navigation: {
accordion: false, // 关闭手风琴模式,允许多个菜单同时展开 accordion: false, // 关闭手风琴模式,允许多个菜单同时展开
@@ -20,6 +26,7 @@ export const overridesPreferences = defineOverridesPreferences({
mode: 'light', mode: 'light',
}, },
transition: { transition: {
enable: false,
loading: false, loading: false,
progress: false, progress: false,
}, },
@@ -1,9 +1,12 @@
<script lang="ts" setup> <script lang="ts" setup>
import { About } from '@vben/common-ui'; import { Page } from '@vben/common-ui';
import { preferences } from '@vben/preferences';
defineOptions({ name: 'About' }); defineOptions({ name: 'About' });
</script> </script>
<template> <template>
<About /> <Page title="关于">
<p class="text-foreground text-sm">{{ preferences.app.name }}</p>
</Page>
</template> </template>
@@ -47,6 +47,8 @@ const formSchema = computed((): VbenFormSchema[] => {
<AuthenticationLogin <AuthenticationLogin
:form-schema="formSchema" :form-schema="formSchema"
:loading="authStore.loginLoading" :loading="authStore.loginLoading"
:show-forget-password="false"
:show-register="false"
@submit="authStore.authLogin" @submit="authStore.authLogin"
/> />
</template> </template>
@@ -5,6 +5,7 @@ export default defineConfig(async () => {
application: { application: {
// 设置API URL // 设置API URL
apiURL: '/api', apiURL: '/api',
printInfoMap: {},
}, },
vite: { vite: {
server: { server: {