From d69d4b99f1245bf7c9040bd15f8bf617c2d6a5d5 Mon Sep 17 00:00:00 2001
From: 董国庆 <364620639@qq.com>
Date: 星期二, 25 二月 2025 14:13:10 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/H5/threeSide
---
management/src/app.tsx | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/management/src/app.tsx b/management/src/app.tsx
index ff44663..bef4a29 100644
--- a/management/src/app.tsx
+++ b/management/src/app.tsx
@@ -7,6 +7,7 @@
import { errorConfig } from './requestErrorConfig';
const loginPath = '/login';
import '../public/font.css'
+import { useEffect, useState } from 'react';
/**
@@ -39,8 +40,21 @@
// ProLayout 支持的api https://procomponents.ant.design/components/layout
export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) => {
+ const [title, setTitle] = useState('');
+ useEffect(() => {
+ const updateTitle = () => {
+ const now = new Date();
+ const days = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
+ const formattedDate = `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()} ${now.getHours()}:${now.getMinutes()} ${days[now.getDay()]}`;
+ setTitle(formattedDate);
+ };
+ updateTitle();
+ const interval = setInterval(updateTitle, 1000); // 每分钟更新一次
+ return () => clearInterval(interval); // 清除定时器
+ }, []);
return {
+ title,
logo: false,
avatarProps: {
title: <AvatarName />,
--
Gitblit v1.7.1