diff --git a/src/views/Community/components/HotEvents.js b/src/views/Community/components/HotEvents.js index cd403793..ec5a3395 100644 --- a/src/views/Community/components/HotEvents.js +++ b/src/views/Community/components/HotEvents.js @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import { Card, Badge, Tag, Empty, Carousel, Tooltip } from 'antd'; import { ArrowUpOutlined, ArrowDownOutlined, LeftOutlined, RightOutlined } from '@ant-design/icons'; -import { useDisclosure } from '@chakra-ui/react'; +import { useDisclosure, useBreakpointValue } from '@chakra-ui/react'; import EventDetailModal from './EventDetailModal'; import dayjs from 'dayjs'; import './HotEvents.css'; @@ -31,6 +31,8 @@ const HotEvents = ({ events, onPageChange, onEventClick }) => { const [currentSlide, setCurrentSlide] = useState(0); const { isOpen: isModalOpen, onOpen: onModalOpen, onClose: onModalClose } = useDisclosure(); const [modalEvent, setModalEvent] = useState(null); + // H5 端不显示 Tooltip(避免触摸触发后无法消除的黑色悬浮框) + const isMobile = useBreakpointValue({ base: true, md: false }); const renderPriceChange = (value) => { if (value === null || value === undefined) { @@ -154,21 +156,33 @@ const HotEvents = ({ events, onPageChange, onEventClick }) => { > {/* Custom layout without Card.Meta */}