feat(web): 增加装饰

This commit is contained in:
v-zhangjc9
2025-07-02 13:06:10 +08:00
parent c46da52942
commit 24ac681cb3
3 changed files with 29 additions and 3 deletions

View File

@@ -1,10 +1,11 @@
import {ProLayout} from '@ant-design/pro-components'
import {type AppItemProps, ProLayout} from '@ant-design/pro-components'
import {ConfigProvider} from 'antd'
import React from 'react'
import {dateFormat} from 'licia'
import React, {useMemo} from 'react'
import {Outlet, useLocation, useNavigate} from 'react-router'
import {menus} from '../route.tsx'
const apps: { title: string, desc: string, url: string, icon?: string }[] = [
const apps: AppItemProps[] = [
{
icon: 'http://132.126.207.124:8686/udal-manager/static/favicon.ico',
title: 'CSV-HUDI处理平台',
@@ -16,8 +17,10 @@ const apps: { title: string, desc: string, url: string, icon?: string }[] = [
const App: React.FC = () => {
const navigate = useNavigate()
const location = useLocation()
const currentYear = useMemo(() => dateFormat(new Date(), 'yyyy'), [])
return (
<ProLayout
siderWidth={180}
token={{
colorTextAppListIcon: '#dfdfdf',
colorTextAppListIconHover: '#ffffff',
@@ -31,8 +34,16 @@ const App: React.FC = () => {
colorBgMenuItemSelected: '#22272b',
colorTextRightActionsItem: '#dfdfdf',
},
pageContainer: {
paddingBlockPageContainerContent: 0,
paddingInlinePageContainerContent: 0,
marginBlockPageContainerContent: 0,
marginInlinePageContainerContent: 0,
},
}}
appList={apps}
defaultCollapsed={false}
breakpoint={false}
disableMobile={true}
logo={<img src="icon.png" alt="logo"/>}
title="Hudi 服务总台"
@@ -47,6 +58,15 @@ const App: React.FC = () => {
splitMenus={true}
style={{minHeight: '100vh'}}
contentStyle={{backgroundColor: 'white', padding: '10px 10px 10px 20px'}}
menuFooterRender={props => {
return (
<div className="text-sm text-center" style={{userSelect: 'none', msUserSelect: 'none'}}>
{props?.collapsed
? undefined
: <div>© 2023-{currentYear} </div>}
</div>
)
}}
>
<ConfigProvider
theme={{

View File

@@ -1 +1,3 @@
/// <reference types="vite/client" />
declare const __APP_VERSION__: string