Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ai-box
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
青山
ai-box
Commits
0ae3f35b
You need to sign in or sign up before continuing.
Commit
0ae3f35b
authored
Jun 20, 2025
by
青山
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改默认密码
parent
2d5293e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
114 deletions
+15
-114
PerpetualCalendar.jsx
src/components/PerpetualCalendar.jsx
+11
-110
tools.json
src/locales/zh/tools.json
+2
-2
Login.jsx
src/pages/Login.jsx
+2
-2
No files found.
src/components/PerpetualCalendar.jsx
View file @
0ae3f35b
...
...
@@ -282,116 +282,17 @@ const PerpetualCalendar = () => {
},
[
selectedYear
,
selectedMonth
]);
return
(
<
CalendarContainer
>
<
CalendarHeader
>
<
Title
level=
{
2
}
style=
{
{
textAlign
:
'center'
}
}
>
万年历
</
Title
>
</
CalendarHeader
>
<
ControlsContainer
>
<
Button
onClick=
{
prevMonth
}
>
<
</
Button
>
<
Select
value=
{
selectedYear
}
onChange=
{
handleYearChange
}
style=
{
{
width
:
100
}
}
>
{
years
.
map
(
year
=>
(
<
Option
key=
{
year
}
value=
{
year
}
>
{
year
}
年
</
Option
>
))
}
</
Select
>
<
Select
value=
{
selectedMonth
}
onChange=
{
handleMonthChange
}
style=
{
{
width
:
100
}
}
>
{
monthNames
.
map
((
month
,
index
)
=>
(
<
Option
key=
{
index
}
value=
{
index
}
>
{
month
}
</
Option
>
))
}
</
Select
>
<
Button
onClick=
{
nextMonth
}
>
>
</
Button
>
<
Button
type=
"primary"
onClick=
{
goToToday
}
>
回到今天
</
Button
>
</
ControlsContainer
>
{
/* 星期表头 */
}
<
CalendarGrid
>
{
weekdayNames
.
map
((
name
,
index
)
=>
(
<
WeekdayHeader
key=
{
index
}
$isWeekend=
{
index
===
0
||
index
===
6
}
>
{
name
}
</
WeekdayHeader
>
))
}
{
/* 日期格子 */
}
{
calendarDays
.
map
((
dateObj
,
index
)
=>
{
const
{
day
,
month
,
year
,
isCurrentMonth
,
lunar
,
holiday
,
date
}
=
dateObj
;
const
dateIsToday
=
isToday
(
year
,
month
,
day
);
const
dayOfWeek
=
date
.
getDay
();
const
isWeekend
=
dayOfWeek
===
0
||
dayOfWeek
===
6
;
// 判断是否为法定节假日或调休
const
isHoliday
=
holiday
&&
holiday
.
type
===
'holiday'
;
const
isWorkday
=
holiday
&&
holiday
.
type
===
'workday'
;
// 判断是否为实际休息日
const
isRestDay
=
isActualRestDay
(
dateObj
);
return
(
<
Tooltip
key=
{
index
}
title=
{
<>
{
holiday
&&
holiday
.
name
&&
<
div
>
{
holiday
.
name
}
</
div
>
}
{
lunar
&&
<
div
>
农历
{
lunar
.
month
}{
lunar
.
isLeapMonth
?
'闰'
:
''
}
月
{
lunar
.
day
}
</
div
>
}
{
isWorkday
&&
<
div
>
调休工作日
</
div
>
}
{
isHoliday
&&
<
div
>
法定节假日
</
div
>
}
{
!
isHoliday
&&
!
isWorkday
&&
isWeekend
&&
<
div
>
周末
</
div
>
}
</>
}
placement=
"top"
>
<
DayCell
$isToday=
{
dateIsToday
}
$isWeekend=
{
isWeekend
}
$isWorkday=
{
isWorkday
}
$isHoliday=
{
isHoliday
}
style=
{
{
opacity
:
isCurrentMonth
?
1
:
0.3
}
}
>
<
DayNumber
$isToday=
{
dateIsToday
}
$isWeekend=
{
isWeekend
}
$isWorkday=
{
isWorkday
}
$isHoliday=
{
isHoliday
}
>
{
day
}
</
DayNumber
>
{
lunar
&&
(
<
LunarDay
>
{
lunar
.
day
===
'初一'
?
`${lunar.month}${lunar.isLeapMonth ? '闰' : ''}月`
:
lunar
.
day
}
</
LunarDay
>
)
}
{
holiday
&&
holiday
.
name
&&
(
<
HolidayTag
>
{
holiday
.
name
}
</
HolidayTag
>
)
}
{
isWorkday
&&
(
<
WorkTag
style=
{
{
backgroundColor
:
colors
.
work
,
color
:
'white'
}
}
>
班
</
WorkTag
>
)
}
{
isHoliday
&&
!
isWorkday
&&
(
<
WorkTag
style=
{
{
backgroundColor
:
colors
.
rest
,
color
:
'white'
}
}
>
休
</
WorkTag
>
)
}
</
DayCell
>
</
Tooltip
>
);
})
}
</
CalendarGrid
>
</
CalendarContainer
>
<
iframe
src=
"https://udify.app/chatbot/bzXkG8DJ67NKFfbB"
title=
"Background Remover"
style=
{
{
width
:
'100%'
,
height
:
'70vh'
,
border
:
'none'
,
minHeight
:
400
,
}
}
allow=
"clipboard-write"
/>
);
};
...
...
src/locales/zh/tools.json
View file @
0ae3f35b
...
...
@@ -283,8 +283,8 @@
}
},
"perpetualCalendar"
:
{
"title"
:
"
万年历
"
,
"description"
:
"
查看任意年份任意月份的日历
"
"title"
:
"
行知企业问答
"
,
"description"
:
"
行知企业问答小助手
"
},
"idPhotoMaker"
:
{
"title"
:
"证件照制作"
,
...
...
src/pages/Login.jsx
View file @
0ae3f35b
...
...
@@ -9,8 +9,8 @@ const Login = () => {
const
{
t
}
=
useTranslation
();
// 新增:用户名密码登录相关状态
const
[
username
,
setUsername
]
=
useState
(
'
testuser
'
);
const
[
password
,
setPassword
]
=
useState
(
'
testpass
'
);
const
[
username
,
setUsername
]
=
useState
(
''
);
const
[
password
,
setPassword
]
=
useState
(
''
);
const
[
loginLoading
,
setLoginLoading
]
=
useState
(
false
);
const
[
loginError
,
setLoginError
]
=
useState
(
''
);
const
[
rememberMe
,
setRememberMe
]
=
useState
(
false
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment