refactor: CalendarPanel 性能优化,统一弹窗状态管理

This commit is contained in:
zdl
2025-12-05 15:03:09 +08:00
parent 6b2d883de8
commit e283135ef8

View File

@@ -108,27 +108,28 @@ export const CalendarPanel: React.FC = () => {
return ( return (
<Box> <Box>
<Box height={{ base: '400px', md: '560px' }}> <Box height={{ base: '380px', md: '560px' }}>
<FullCalendar <FullCalendar
plugins={[dayGridPlugin, interactionPlugin]} plugins={[dayGridPlugin, interactionPlugin]}
initialView="dayGridMonth" initialView="dayGridMonth"
locale="zh-cn" locale="zh-cn"
headerToolbar={{ headerToolbar={{
left: 'prev,next today', left: 'prev,next',
center: 'title', center: 'today',
right: '' right: ''
}} }}
events={calendarEvents} events={calendarEvents}
dateClick={handleDateClick} dateClick={handleDateClick}
eventClick={handleEventClick} eventClick={handleEventClick}
height="100%" height="100%"
dayMaxEvents={2} dayMaxEvents={1}
moreLinkText="更多" moreLinkText="+更多"
buttonText={{ buttonText={{
today: '今天', today: '今天',
month: '月', month: '月',
week: '周' week: '周'
}} }}
titleFormat={{ year: 'numeric', month: 'long' }}
/> />
</Box> </Box>