diff --git a/src/components/StockChart/KLineChartModal.tsx b/src/components/StockChart/KLineChartModal.tsx index 69e109c1..980452cf 100644 --- a/src/components/StockChart/KLineChartModal.tsx +++ b/src/components/StockChart/KLineChartModal.tsx @@ -460,21 +460,34 @@ const KLineChartModal: React.FC = ({ if (!stock) return null; - // 计算实际使用的 z-index - const overlayZIndex = zIndex || 1400; - const contentZIndex = zIndex ? zIndex + 1 : 1401; + // 计算实际使用的 z-index(使用超高值确保在最上层) + const overlayZIndex = zIndex || 9998; + const contentZIndex = zIndex ? zIndex + 1 : 9999; console.log('[KLineChartModal] z-index 设置:', { overlayZIndex, contentZIndex, + isOpen, }); return ( - + = ({ bg="#1a1a1a" borderColor="#404040" borderWidth="1px" - style={{ zIndex: contentZIndex }} + style={{ + position: 'fixed', + zIndex: contentZIndex, + top: '50%', + left: '50%', + transform: 'translate(-50%, -50%)', + margin: 0, + }} > diff --git a/src/views/Community/components/InvestmentCalendar.js b/src/views/Community/components/InvestmentCalendar.js index fd4e9e30..d71ade3f 100644 --- a/src/views/Community/components/InvestmentCalendar.js +++ b/src/views/Community/components/InvestmentCalendar.js @@ -840,7 +840,7 @@ const InvestmentCalendar = () => { )} - {/* K线图弹窗 - 需要更高的 z-index,因为投资日历本身就是 Modal */} + {/* K线图弹窗 - 使用超高 z-index 确保显示在最上层 */} {selectedStock && ( { stock={selectedStock} eventTime={selectedEventTime} size="5xl" - zIndex={2000} + zIndex={9998} /> )}