style(favorites): 优化收藏页面样式和交互设计
重构操作区域布局,新增独立的查看按钮并优化删除按钮样式 为所有操作按钮添加文字说明以提升可访问性 使用颜色区分操作类型(蓝色查看,红色删除) 调整列表项标题显示,支持最多两行文本并优化行高 优化按钮点击热区和交互反馈效果
Showing
2 changed files
with
35 additions
and
9 deletions
| 1 | +## [2026-01-31] - 我的收藏页面样式优化 | ||
| 2 | + | ||
| 3 | +### 优化 | ||
| 4 | +- 优化我的收藏页面 (`src/pages/favorites`) 的布局和样式 | ||
| 5 | + - 重构操作区,新增"查看"按钮并优化"删除"按钮 | ||
| 6 | + - 为所有操作按钮添加文字说明,提升可访问性 | ||
| 7 | + - 使用颜色区分操作类型(查看为蓝色,删除为红色) | ||
| 8 | + - 调整列表项标题显示,支持最多两行文本 (`line-clamp-2`) | ||
| 9 | + - 优化按钮点击热区和反馈效果 | ||
| 10 | + | ||
| 11 | +--- | ||
| 12 | + | ||
| 13 | +**详细信息**: | ||
| 14 | +- **影响文件**: src/pages/favorites/index.vue | ||
| 15 | +- **技术栈**: Vue 3, Tailwind CSS | ||
| 16 | +- **测试状态**: 已通过 | ||
| 17 | +- **备注**: | ||
| 18 | + - 响应用户关于新增查看按钮和图标文字说明的需求 | ||
| 19 | + | ||
| 1 | ## [2026-01-31] - 知识库页面添加产品点击跳转 | 20 | ## [2026-01-31] - 知识库页面添加产品点击跳转 |
| 2 | 21 | ||
| 3 | ### 新增 | 22 | ### 新增 |
| ... | @@ -97,7 +116,7 @@ | ... | @@ -97,7 +116,7 @@ |
| 97 | - **影响文件**: src/pages/index/index.vue | 116 | - **影响文件**: src/pages/index/index.vue |
| 98 | - **技术栈**: Vue 3, Taro 4, NutUI, IconFont | 117 | - **技术栈**: Vue 3, Taro 4, NutUI, IconFont |
| 99 | - **测试状态**: 已通过 | 118 | - **测试状态**: 已通过 |
| 100 | -- **备注**: | 119 | +- **备注**: |
| 101 | - 统一首页与资料列表页的图标样式 | 120 | - 统一首页与资料列表页的图标样式 |
| 102 | - 提升视觉一致性 | 121 | - 提升视觉一致性 |
| 103 | - 更符合整体设计风格 | 122 | - 更符合整体设计风格 |
| ... | @@ -115,7 +134,7 @@ | ... | @@ -115,7 +134,7 @@ |
| 115 | - **影响文件**: ~/.claude/rules/code-commenting.md, ~/.claude/rules/README.md, README.md | 134 | - **影响文件**: ~/.claude/rules/code-commenting.md, ~/.claude/rules/README.md, README.md |
| 116 | - **技术栈**: 文档 | 135 | - **技术栈**: 文档 |
| 117 | - **测试状态**: N/A | 136 | - **测试状态**: N/A |
| 118 | -- **备注**: | 137 | +- **备注**: |
| 119 | - 所有函数和方法必须使用 JSDoc 注释 | 138 | - 所有函数和方法必须使用 JSDoc 注释 |
| 120 | - 包含功能说明、参数说明、返回值说明 | 139 | - 包含功能说明、参数说明、返回值说明 |
| 121 | - 复杂逻辑需要详细注释 | 140 | - 复杂逻辑需要详细注释 |
| ... | @@ -135,7 +154,7 @@ | ... | @@ -135,7 +154,7 @@ |
| 135 | - **影响文件**: CLAUDE.md, ~/.claude/rules/changelog-automation.md, ~/.claude/rules/README.md | 154 | - **影响文件**: CLAUDE.md, ~/.claude/rules/changelog-automation.md, ~/.claude/rules/README.md |
| 136 | - **技术栈**: 文档 | 155 | - **技术栈**: 文档 |
| 137 | - **测试状态**: N/A | 156 | - **测试状态**: N/A |
| 138 | -- **备注**: | 157 | +- **备注**: |
| 139 | - 提升 Claude Code 中文用户体验 | 158 | - 提升 Claude Code 中文用户体验 |
| 140 | - 建立自动化变更日志记录机制 | 159 | - 建立自动化变更日志记录机制 |
| 141 | - 每次任务完成后自动记录到 docs/CHANGELOG.md | 160 | - 每次任务完成后自动记录到 docs/CHANGELOG.md | ... | ... |
| ... | @@ -21,7 +21,7 @@ | ... | @@ -21,7 +21,7 @@ |
| 21 | <view class="w-[706rpx] mt-[32rpx] flex flex-col gap-[24rpx]"> | 21 | <view class="w-[706rpx] mt-[32rpx] flex flex-col gap-[24rpx]"> |
| 22 | <view v-for="(item, index) in filteredList" :key="index" | 22 | <view v-for="(item, index) in filteredList" :key="index" |
| 23 | class="bg-white rounded-[24rpx] p-[32rpx] shadow-sm flex items-center justify-between"> | 23 | class="bg-white rounded-[24rpx] p-[32rpx] shadow-sm flex items-center justify-between"> |
| 24 | - <view class="flex items-center flex-1 mr-[24rpx]" @tap="onView(item)"> | 24 | + <view class="flex items-center flex-1 mr-[24rpx]"> |
| 25 | <!-- Icon (Text Type Icons as requested) --> | 25 | <!-- Icon (Text Type Icons as requested) --> |
| 26 | <view class="w-[80rpx] h-[80rpx] rounded-[16rpx] flex items-center justify-center mr-[24rpx]" | 26 | <view class="w-[80rpx] h-[80rpx] rounded-[16rpx] flex items-center justify-center mr-[24rpx]" |
| 27 | :class="item.iconBgClass"> | 27 | :class="item.iconBgClass"> |
| ... | @@ -29,8 +29,8 @@ | ... | @@ -29,8 +29,8 @@ |
| 29 | </view> | 29 | </view> |
| 30 | 30 | ||
| 31 | <!-- Text Content --> | 31 | <!-- Text Content --> |
| 32 | - <view class="flex flex-col flex-1"> | 32 | + <view class="flex flex-col flex-1 min-w-0"> |
| 33 | - <view class="text-[32rpx] text-[#1F2937] font-bold mb-[8rpx] line-clamp-1">{{ item.title }}</view> | 33 | + <view class="text-[32rpx] text-[#1F2937] font-bold mb-[8rpx] line-clamp-2 leading-[1.4]">{{ item.title }}</view> |
| 34 | <view class="flex flex-col items-start gap-[8rpx]"> | 34 | <view class="flex flex-col items-start gap-[8rpx]"> |
| 35 | <view class="bg-gray-100 px-[12rpx] py-[4rpx] rounded-[8rpx] text-[24rpx] text-[#9CA3AF] mt-1">{{ item.category | 35 | <view class="bg-gray-100 px-[12rpx] py-[4rpx] rounded-[8rpx] text-[24rpx] text-[#9CA3AF] mt-1">{{ item.category |
| 36 | }}</view> | 36 | }}</view> |
| ... | @@ -40,10 +40,17 @@ | ... | @@ -40,10 +40,17 @@ |
| 40 | </view> | 40 | </view> |
| 41 | 41 | ||
| 42 | <!-- Action Buttons --> | 42 | <!-- Action Buttons --> |
| 43 | - <view class="flex items-center gap-[16rpx]"> | 43 | + <view class="flex flex-col items-end gap-[16rpx] ml-[16rpx] flex-shrink-0"> |
| 44 | + <!-- View Button --> | ||
| 45 | + <view class="flex items-center justify-center px-[20rpx] py-[10rpx] bg-blue-50 rounded-full active:bg-blue-100 transition-colors" @tap.stop="onView(item)"> | ||
| 46 | + <IconFont name="eye" size="14" color="#2563EB" class="mr-[6rpx]" /> | ||
| 47 | + <text class="text-[24rpx] text-blue-600 font-medium leading-none">查看</text> | ||
| 48 | + </view> | ||
| 49 | + | ||
| 44 | <!-- Delete Button --> | 50 | <!-- Delete Button --> |
| 45 | - <view class="p-[10rpx]" @tap.stop="onDelete(item)"> | 51 | + <view class="flex items-center justify-center px-[20rpx] py-[10rpx] bg-red-50 rounded-full active:bg-red-100 transition-colors" @tap.stop="onDelete(item)"> |
| 46 | - <IconFont name="del" size="18" color="#999" /> | 52 | + <IconFont name="del" size="14" color="#EF4444" class="mr-[6rpx]" /> |
| 53 | + <text class="text-[24rpx] text-red-500 font-medium leading-none">删除</text> | ||
| 47 | </view> | 54 | </view> |
| 48 | </view> | 55 | </view> |
| 49 | </view> | 56 | </view> | ... | ... |
-
Please register or login to post a comment