diff --git a/src/views/Community/components/InvestmentCalendar.js b/src/views/Community/components/InvestmentCalendar.js index 44dd765f..3df32c21 100644 --- a/src/views/Community/components/InvestmentCalendar.js +++ b/src/views/Community/components/InvestmentCalendar.js @@ -133,9 +133,12 @@ const InvestmentCalendar = () => { loadEventCounts(currentMonth); }, [currentMonth, loadEventCounts]); - // 自定义日期单元格渲染 - const dateCellRender = (value) => { - const dateStr = value.format('YYYY-MM-DD'); + // 自定义日期单元格渲染(Ant Design 5.x API) + const cellRender = (current, info) => { + // 只处理日期单元格,月份单元格返回默认 + if (info.type !== 'date') return info.originNode; + + const dateStr = current.format('YYYY-MM-DD'); const dayEvents = eventCounts.find(item => item.date === dateStr); if (dayEvents && dayEvents.count > 0) { @@ -681,7 +684,7 @@ const InvestmentCalendar = () => { > setCurrentMonth(date)} /> @@ -695,11 +698,11 @@ const InvestmentCalendar = () => { {selectedDate?.format('YYYY年MM月DD日')} 投资事件 } - visible={modalVisible} + open={modalVisible} onCancel={() => setModalVisible(false)} width={1200} footer={null} - bodyStyle={{ padding: '24px' }} + styles={{ body: { padding: '24px' } }} zIndex={1500} > @@ -734,7 +737,7 @@ const InvestmentCalendar = () => { placement="right" width={600} onClose={() => setDetailDrawerVisible(false)} - visible={detailDrawerVisible} + open={detailDrawerVisible} zIndex={1500} > {selectedDetail?.content?.type === 'citation' ? ( @@ -760,7 +763,7 @@ const InvestmentCalendar = () => { )} } - visible={stockModalVisible} + open={stockModalVisible} onCancel={() => { setStockModalVisible(false); setExpandedReasons({}); // 清理展开状态