30 lines
611 B
Plaintext
30 lines
611 B
Plaintext
<template>
|
|
<view class="w-full p-3 bg-white rounded-xl mb-3 dark:bg-surface-800">
|
|
<cl-image :src="item.image" mode="widthFix" width="100%" height="250rpx"></cl-image>
|
|
<cl-text :pt="{ className: 'mt-2' }">{{ item.title }}</cl-text>
|
|
</view>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { computed, type PropType } from "vue";
|
|
import { useParent } from "@/cool";
|
|
|
|
defineOptions({
|
|
name: "goods-item"
|
|
});
|
|
|
|
type GoodsItem = {
|
|
id: number;
|
|
likeCount: number;
|
|
title: string;
|
|
image: string;
|
|
};
|
|
|
|
const props = defineProps({
|
|
item: {
|
|
type: Object as PropType<GoodsItem>,
|
|
default: () => ({})
|
|
}
|
|
});
|
|
</script>
|