fix: hide sidebar user actions and add navTheme config
This commit is contained in:
parent
5141e9c72b
commit
0cdf53523e
@ -14,7 +14,7 @@ export default defineConfig({
|
||||
},
|
||||
proxy: {
|
||||
'/api/': {
|
||||
target: 'http://10.39.13.78:8001/',
|
||||
target: 'http://10.39.13.78:8002/',
|
||||
// target: 'https://test-admin.linyikj.com.cn/',
|
||||
// target: 'https://admin.linyikj.com.cn/',
|
||||
changeOrigin: true,
|
||||
|
||||
@ -39,24 +39,27 @@ export const LayoutConfig: RuntimeConfig['layout'] = () => {
|
||||
colorPrimary: '#1890ff',
|
||||
siderWidth: 220,
|
||||
pure: history.location.pathname === '/login',
|
||||
// 禁用顶部导航栏的菜单
|
||||
navTheme: 'light',
|
||||
|
||||
// 新增:自定义Header渲染
|
||||
headerRender: () => {
|
||||
return <CustomHeader />;
|
||||
},
|
||||
// 自定义Header渲染
|
||||
// 注意:在side模式下,headerRender可能需要特殊处理
|
||||
// headerRender: false, // 完全禁用header
|
||||
|
||||
// 新增:自定义Logo渲染
|
||||
logoRenderer: (collapsed: boolean) => {
|
||||
return <CustomLogo collapsed={collapsed} />;
|
||||
},
|
||||
|
||||
// 移除avatarProps以避免在侧边栏底部重复显示用户信息
|
||||
// 用户信息已在CustomHeader中显示
|
||||
// 完全禁用用户信息在侧边栏底部显示
|
||||
// avatarProps: false, // 这样可以完全禁用
|
||||
//水印设置
|
||||
// waterMarkProps: {
|
||||
// content: snap.session.user?.username,
|
||||
// },
|
||||
collapsedButtonRender: false,
|
||||
// 禁用底部的版权信息等
|
||||
footerRender: false,
|
||||
token: {
|
||||
bgLayout: '#f5f5f5', // 浅灰布局背景
|
||||
header: {
|
||||
|
||||
@ -12,6 +12,7 @@ import {
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { stateActions } from '..';
|
||||
import loginBgImg from './loginBgImg.jpg';
|
||||
|
||||
export function MyLoginPage1() {
|
||||
const navigate = useNavigate();
|
||||
@ -37,8 +38,9 @@ export function MyLoginPage1() {
|
||||
>
|
||||
<LoginFormPage<ApiTypes.Common.Auth.Login>
|
||||
title="欢迎使用后台管理系统"
|
||||
backgroundVideoUrl="https://gw.alipayobjects.com/v/huamei_gcee1x/afts/video/jXRBRK_VAwoAAAAAAAAAAAAAK4eUAQBr"
|
||||
subTitle="Admin management system"
|
||||
// backgroundVideoUrl="https://gw.alipayobjects.com/v/huamei_gcee1x/afts/video/jXRBRK_VAwoAAAAAAAAAAAAAK4eUAQBr"
|
||||
backgroundImageUrl={loginBgImg}
|
||||
subTitle="物业管理平台管理后台"
|
||||
onFinish={async (values: any) => {
|
||||
Apis.Common.Auth.Login({
|
||||
...values,
|
||||
|
||||
BIN
src/common/pages/loginBgImg.jpg
Normal file
BIN
src/common/pages/loginBgImg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 110 KiB |
@ -98,3 +98,17 @@ body {
|
||||
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
// 隐藏侧边栏底部的用户信息区域
|
||||
.ant-pro-sider .ant-pro-sider-actions {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.ant-pro-sider-collapsed .ant-pro-sider-actions {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
// 确保顶部Header显示
|
||||
.ant-pro-header {
|
||||
display: flex !important;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user