refactor: CalendarPanel 性能优化,统一弹窗状态管理
This commit is contained in:
@@ -108,27 +108,28 @@ export const CalendarPanel: React.FC = () => {
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Box height={{ base: '400px', md: '560px' }}>
|
||||
<Box height={{ base: '380px', md: '560px' }}>
|
||||
<FullCalendar
|
||||
plugins={[dayGridPlugin, interactionPlugin]}
|
||||
initialView="dayGridMonth"
|
||||
locale="zh-cn"
|
||||
headerToolbar={{
|
||||
left: 'prev,next today',
|
||||
center: 'title',
|
||||
left: 'prev,next',
|
||||
center: 'today',
|
||||
right: ''
|
||||
}}
|
||||
events={calendarEvents}
|
||||
dateClick={handleDateClick}
|
||||
eventClick={handleEventClick}
|
||||
height="100%"
|
||||
dayMaxEvents={2}
|
||||
moreLinkText="更多"
|
||||
dayMaxEvents={1}
|
||||
moreLinkText="+更多"
|
||||
buttonText={{
|
||||
today: '今天',
|
||||
month: '月',
|
||||
week: '周'
|
||||
}}
|
||||
titleFormat={{ year: 'numeric', month: 'long' }}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user