update pay function

This commit is contained in:
2025-11-25 08:00:56 +08:00
parent 761fe5d2f0
commit a2f33c2a8a
2 changed files with 28 additions and 8 deletions

View File

@@ -460,21 +460,34 @@ const KLineChartModal: React.FC<KLineChartModalProps> = ({
if (!stock) return null; if (!stock) return null;
// 计算实际使用的 z-index // 计算实际使用的 z-index(使用超高值确保在最上层)
const overlayZIndex = zIndex || 1400; const overlayZIndex = zIndex || 9998;
const contentZIndex = zIndex ? zIndex + 1 : 1401; const contentZIndex = zIndex ? zIndex + 1 : 9999;
console.log('[KLineChartModal] z-index 设置:', { console.log('[KLineChartModal] z-index 设置:', {
overlayZIndex, overlayZIndex,
contentZIndex, contentZIndex,
isOpen,
}); });
return ( return (
<Portal> <Portal>
<Modal isOpen={isOpen} onClose={onClose} size={size}> <Modal
isOpen={isOpen}
onClose={onClose}
size={size}
blockScrollOnMount={false}
>
<ModalOverlay <ModalOverlay
bg="blackAlpha.700" bg="blackAlpha.700"
style={{ zIndex: overlayZIndex }} style={{
position: 'fixed',
zIndex: overlayZIndex,
top: 0,
left: 0,
width: '100vw',
height: '100vh',
}}
/> />
<ModalContent <ModalContent
maxW="90vw" maxW="90vw"
@@ -482,7 +495,14 @@ const KLineChartModal: React.FC<KLineChartModalProps> = ({
bg="#1a1a1a" bg="#1a1a1a"
borderColor="#404040" borderColor="#404040"
borderWidth="1px" borderWidth="1px"
style={{ zIndex: contentZIndex }} style={{
position: 'fixed',
zIndex: contentZIndex,
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
margin: 0,
}}
> >
<ModalHeader pb={3} borderBottomWidth="1px" borderColor="#404040"> <ModalHeader pb={3} borderBottomWidth="1px" borderColor="#404040">
<VStack align="flex-start" spacing={1}> <VStack align="flex-start" spacing={1}>

View File

@@ -840,7 +840,7 @@ const InvestmentCalendar = () => {
)} )}
</Modal> </Modal>
{/* K线图弹窗 - 需要更高的 z-index,因为投资日历本身就是 Modal */} {/* K线图弹窗 - 使用超高 z-index 确保显示在最上层 */}
{selectedStock && ( {selectedStock && (
<KLineChartModal <KLineChartModal
isOpen={klineModalVisible} isOpen={klineModalVisible}
@@ -852,7 +852,7 @@ const InvestmentCalendar = () => {
stock={selectedStock} stock={selectedStock}
eventTime={selectedEventTime} eventTime={selectedEventTime}
size="5xl" size="5xl"
zIndex={2000} zIndex={9998}
/> />
)} )}