|
@@ -8,7 +8,6 @@ export interface GoodsListProps {
|
|
|
thresholds?: any[]
|
|
thresholds?: any[]
|
|
|
onClick?: (goods: GoodsData, index: number) => void
|
|
onClick?: (goods: GoodsData, index: number) => void
|
|
|
onAddCart?: (goods: GoodsData, index: number) => void
|
|
onAddCart?: (goods: GoodsData, index: number) => void
|
|
|
- onThumbClick?: (goods: GoodsData, index: number) => void
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
export default function GoodsList({
|
|
export default function GoodsList({
|
|
@@ -16,8 +15,7 @@ export default function GoodsList({
|
|
|
id,
|
|
id,
|
|
|
thresholds = [],
|
|
thresholds = [],
|
|
|
onClick,
|
|
onClick,
|
|
|
- onAddCart,
|
|
|
|
|
- onThumbClick
|
|
|
|
|
|
|
+ onAddCart
|
|
|
}: GoodsListProps) {
|
|
}: GoodsListProps) {
|
|
|
const independentID = id || `goods-list-${Math.floor(Math.random() * 10 ** 8)}`
|
|
const independentID = id || `goods-list-${Math.floor(Math.random() * 10 ** 8)}`
|
|
|
|
|
|
|
@@ -29,9 +27,6 @@ export default function GoodsList({
|
|
|
onAddCart?.(goods, index)
|
|
onAddCart?.(goods, index)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const handleThumbClick = (goods: GoodsData, index: number) => {
|
|
|
|
|
- onThumbClick?.(goods, index)
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<View
|
|
<View
|
|
@@ -46,7 +41,6 @@ export default function GoodsList({
|
|
|
currency={'¥'}
|
|
currency={'¥'}
|
|
|
onClick={() => handleGoodsClick(item, index)}
|
|
onClick={() => handleGoodsClick(item, index)}
|
|
|
onAddCart={() => handleAddCart(item, index)}
|
|
onAddCart={() => handleAddCart(item, index)}
|
|
|
- onThumbClick={() => handleThumbClick(item, index)}
|
|
|
|
|
// className="goods-card-inside"
|
|
// className="goods-card-inside"
|
|
|
/>
|
|
/>
|
|
|
))}
|
|
))}
|