update pay function

This commit is contained in:
2025-11-25 10:09:47 +08:00
parent cc446fc0da
commit f873fdb9a6
2 changed files with 6 additions and 19 deletions

View File

@@ -42,8 +42,6 @@ export interface KLineChartModalProps {
eventTime?: string | null;
/** 模态框大小 */
size?: string;
/** z-index 层级(用于嵌套 Modal 场景) */
zIndex?: number;
}
/**
@@ -64,7 +62,6 @@ const KLineChartModal: React.FC<KLineChartModalProps> = ({
stock,
eventTime,
size = '5xl',
zIndex,
}) => {
const chartRef = useRef<HTMLDivElement>(null);
const chartInstance = useRef<echarts.ECharts | null>(null);
@@ -459,15 +456,7 @@ const KLineChartModal: React.FC<KLineChartModalProps> = ({
if (!stock) return null;
// 计算实际使用的 z-index使用超高值确保在最上层
const overlayZIndex = zIndex || 9998;
const contentZIndex = zIndex ? zIndex + 1 : 9999;
console.log('[KLineChartModal] z-index 设置:', {
overlayZIndex,
contentZIndex,
isOpen,
});
console.log('[KLineChartModal] 渲染 Modal, isOpen:', isOpen);
return (
<Modal
@@ -477,15 +466,11 @@ const KLineChartModal: React.FC<KLineChartModalProps> = ({
blockScrollOnMount={false}
isCentered
>
<ModalOverlay
bg="blackAlpha.700"
zIndex={overlayZIndex}
/>
<ModalOverlay bg="blackAlpha.700" />
<ModalContent
maxW="90vw"
maxH="85vh"
bg="#1a1a1a"
zIndex={contentZIndex}
border="2px solid #ffd700"
boxShadow="0 0 30px rgba(255, 215, 0, 0.5)"
>

View File

@@ -296,6 +296,9 @@ const InvestmentCalendar = () => {
formattedEventTime: formattedEventTime
});
// 先关闭相关股票模态框,避免 z-index 冲突
setStockModalVisible(false);
setSelectedStock({
stock_code: stockCode, // 添加交易所后缀
stock_name: stock[1]
@@ -840,7 +843,7 @@ const InvestmentCalendar = () => {
)}
</Modal>
{/* K线图弹窗 - 使用超高 z-index 确保显示在最上层 */}
{/* K线图弹窗 */}
{selectedStock && (
<KLineChartModal
isOpen={klineModalVisible}
@@ -852,7 +855,6 @@ const InvestmentCalendar = () => {
stock={selectedStock}
eventTime={selectedEventTime}
size="5xl"
zIndex={9998}
/>
)}