forked from gxwebsoft/mp-10550
refactor(components): 重构 CouponCard 组件样式
- 优化了 CouponCard 组件的视觉效果,增加了更多细节和动画 - 添加了响应式样式,提高了移动端体验 - 新增了 CouponList组件样式,用于展示优惠券列表
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Badge } from "@nutui/nutui-react-taro";
|
||||
import { Cart } from "@nutui/icons-react-taro";
|
||||
import Taro from '@tarojs/taro';
|
||||
import { useCart } from "@/hooks/useCart";
|
||||
import { switchTab } from '@/utils/navigation';
|
||||
|
||||
interface CartIconProps {
|
||||
style?: React.CSSProperties;
|
||||
@@ -26,13 +26,13 @@ const CartIcon: React.FC<CartIconProps> = ({
|
||||
onClick();
|
||||
} else {
|
||||
// 默认跳转到购物车页面
|
||||
Taro.switchTab({ url: '/pages/cart/cart' });
|
||||
switchTab('cart/cart');
|
||||
}
|
||||
};
|
||||
|
||||
if (showBadge) {
|
||||
return (
|
||||
<div
|
||||
<div
|
||||
className={className}
|
||||
style={style}
|
||||
onClick={handleClick}
|
||||
@@ -47,7 +47,7 @@ const CartIcon: React.FC<CartIconProps> = ({
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
<div
|
||||
className={className}
|
||||
style={style}
|
||||
onClick={handleClick}
|
||||
|
||||
Reference in New Issue
Block a user