cloudroam
2025-07-17 f3ea52bf97e61f6917ccaab904817d74d9d4860c
pages/home/community.vue
@@ -1,5 +1,5 @@
<template>
  <view class="post-card">
  <view class="post-card"  @click="handleClick">
    <!-- 用户信息 -->
    <view class="user-info">
      <up-avatar :src="avatar" size="80rpx" shape="circle" />
@@ -56,11 +56,20 @@
  content?: string;
  likeCount?: number | string;
  commentCount?: number | string;
  detailUrl?: string; // 新增跳转链接
}
const props = defineProps<Props>();
const imageHeight = ref(0)
const handleClick = () => {
  if (props.detailUrl) {
    uni.navigateTo({
      url: props.detailUrl
    });
  }
}; // 注意这里需要分号
const computeImageHeight = (src?: string) => {
  if (!src) return
  uni.getImageInfo({