|
@@ -151,14 +151,12 @@ export default function GoodsListPage() {
|
|
|
{/* 分类筛选 */}
|
|
{/* 分类筛选 */}
|
|
|
<View className="flex space-x-2 mb-4 overflow-x-auto">
|
|
<View className="flex space-x-2 mb-4 overflow-x-auto">
|
|
|
{categories.map((category) => (
|
|
{categories.map((category) => (
|
|
|
- <Button
|
|
|
|
|
|
|
+ <View
|
|
|
key={category.id}
|
|
key={category.id}
|
|
|
- size="sm"
|
|
|
|
|
- variant={activeCategory === category.id ? "solid" : "ghost"}
|
|
|
|
|
- className={`whitespace-nowrap rounded-full px-4 py-2 transition-all ${
|
|
|
|
|
|
|
+ className={`whitespace-nowrap rounded-full px-4 py-2 transition-all cursor-pointer ${
|
|
|
activeCategory === category.id
|
|
activeCategory === category.id
|
|
|
? 'bg-blue-500 text-white shadow-md'
|
|
? 'bg-blue-500 text-white shadow-md'
|
|
|
- : 'text-gray-600 hover:bg-gray-100'
|
|
|
|
|
|
|
+ : 'text-gray-600 bg-gray-100 hover:bg-gray-200'
|
|
|
}`}
|
|
}`}
|
|
|
onClick={() => {
|
|
onClick={() => {
|
|
|
setActiveCategory(category.id)
|
|
setActiveCategory(category.id)
|
|
@@ -166,7 +164,7 @@ export default function GoodsListPage() {
|
|
|
}}
|
|
}}
|
|
|
>
|
|
>
|
|
|
{category.name}
|
|
{category.name}
|
|
|
- </Button>
|
|
|
|
|
|
|
+ </View>
|
|
|
))}
|
|
))}
|
|
|
</View>
|
|
</View>
|
|
|
|
|
|
|
@@ -238,7 +236,7 @@ export default function GoodsListPage() {
|
|
|
</View>
|
|
</View>
|
|
|
|
|
|
|
|
<Button
|
|
<Button
|
|
|
- size="mini"
|
|
|
|
|
|
|
+ size="sm"
|
|
|
className={`!w-8 !h-8 !p-0 rounded-full transition-all ${
|
|
className={`!w-8 !h-8 !p-0 rounded-full transition-all ${
|
|
|
goods.stock > 0
|
|
goods.stock > 0
|
|
|
? 'bg-gradient-to-r from-blue-500 to-blue-600 text-white shadow-md active:shadow-lg'
|
|
? 'bg-gradient-to-r from-blue-500 to-blue-600 text-white shadow-md active:shadow-lg'
|