diff --git a/themes/heo/components/MenuItemDrop.js b/themes/heo/components/MenuItemDrop.js index 2e8709ff..0b9c3053 100644 --- a/themes/heo/components/MenuItemDrop.js +++ b/themes/heo/components/MenuItemDrop.js @@ -13,8 +13,6 @@ export const MenuItemDrop = ({ link }) => {
changeShow(true)} onMouseOut={() => changeShow(false)}> - {' '} - menu-link pl-2 pr-4 no-underline tracking-widest pb-1 {/* 不含子菜单 */} {!hasSubMenu && ( { + const handleClick = item => { if (isBrowser) { window.open(item?.url) } @@ -24,50 +24,53 @@ export function Swipe({ items }) { }, [activeIndex, items.length]) return ( -
- {items.map((item, index) => ( -
handleClick(item)} - key={index} - className={`absolute top-0 bottom-0 w-full h-full flex justify-center items-center line-clamp-1 transform transition-transform duration-500 ${index === activeIndex ? 'translate-y-0 slide-in' : 'translate-y-full slide-out' - }`} - > - {item.title} -
- ))} - +
+ {items.map((item, index) => ( +
handleClick(item)} + key={index} + className={`whitespace-nowrap absolute top-0 bottom-0 w-full h-full flex justify-center items-center line-clamp-1 transform transition-transform duration-500 ${ + index === activeIndex + ? 'translate-y-0 slide-in' + : 'translate-y-full slide-out' + }`}> + {item.title}
+ ))} + + +
) -}; +} export default Swipe