hookehuyr

refactor(article): 移除 ArticleCard 整体卡片点击跳转

- 移除卡片容器的点击事件,避免误触跳转
- 删除 handleCardClick 函数
- 保留"查看"按钮的跳转功能

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 <template> 1 <template>
2 - <view class="flex flex-row bg-white rounded-[24rpx] p-[24rpx] shadow-sm border border-gray-100 article-card" @tap="handleCardClick"> 2 + <view class="flex flex-row bg-white rounded-[24rpx] p-[24rpx] shadow-sm border border-gray-100 article-card">
3 <!-- 左侧封面图 --> 3 <!-- 左侧封面图 -->
4 <view v-if="showCover" class="w-[160rpx] h-[120rpx] mr-[24rpx] flex-shrink-0 rounded-[16rpx] overflow-hidden bg-gray-100 self-start"> 4 <view v-if="showCover" class="w-[160rpx] h-[120rpx] mr-[24rpx] flex-shrink-0 rounded-[16rpx] overflow-hidden bg-gray-100 self-start">
5 <image 5 <image
...@@ -150,21 +150,12 @@ const formattedDate = computed(() => { ...@@ -150,21 +150,12 @@ const formattedDate = computed(() => {
150 const { toggleCollect } = useCollectOperation(); 150 const { toggleCollect } = useCollectOperation();
151 151
152 /** 152 /**
153 - * 处理卡片点击
154 - *
155 - * @description 跳转到文章详情页
156 - */
157 -const handleCardClick = () => {
158 - go('/pages/article-detail/index', { id: props.id });
159 -};
160 -
161 -/**
162 * 处理查看点击 153 * 处理查看点击
163 * 154 *
164 * @description 跳转到文章详情页 155 * @description 跳转到文章详情页
165 */ 156 */
166 const handleView = () => { 157 const handleView = () => {
167 - handleCardClick(); 158 + go('/pages/article-detail/index', { id: props.id });
168 // 通知父组件查看完成 159 // 通知父组件查看完成
169 emit('viewed', { id: props.id }); 160 emit('viewed', { id: props.id });
170 }; 161 };
......