cloudroam
10 天以前 05316275ee6f1623cc022a3cb4967a440c105a6b
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({