diff --git a/src/components/StockChart/KLineChartModal.tsx b/src/components/StockChart/KLineChartModal.tsx index 76d1e0ee..1fd1a118 100644 --- a/src/components/StockChart/KLineChartModal.tsx +++ b/src/components/StockChart/KLineChartModal.tsx @@ -42,6 +42,8 @@ export interface KLineChartModalProps { eventTime?: string | null; /** 模态框大小 */ size?: string; + /** z-index 层级(用于嵌套 Modal 场景) */ + zIndex?: number; } /** @@ -62,6 +64,7 @@ const KLineChartModal: React.FC = ({ stock, eventTime, size = '5xl', + zIndex, }) => { const chartRef = useRef(null); const chartInstance = useRef(null); @@ -447,13 +450,14 @@ const KLineChartModal: React.FC = ({ return ( - + diff --git a/src/views/Community/components/InvestmentCalendar.js b/src/views/Community/components/InvestmentCalendar.js index 380ba103..fd4e9e30 100644 --- a/src/views/Community/components/InvestmentCalendar.js +++ b/src/views/Community/components/InvestmentCalendar.js @@ -840,7 +840,7 @@ const InvestmentCalendar = () => { )} - {/* K线图弹窗 */} + {/* K线图弹窗 - 需要更高的 z-index,因为投资日历本身就是 Modal */} {selectedStock && ( { }} stock={selectedStock} eventTime={selectedEventTime} + size="5xl" + zIndex={2000} /> )}