首次完整推送,

V:1.20240808.006
This commit is contained in:
fm453
2024-08-13 18:32:37 +08:00
parent 15be3e9373
commit c62d15b288
939 changed files with 111777 additions and 0 deletions

View File

@ -0,0 +1,50 @@
<template>
<view
:to="'/uni_modules/uni-cms-article/pages/detail/detail?id=' + data?._id"
:key="data?._id"
class="list-item"
>
<view class="main">
<text class="title">{{ data?.title }}</text>
<view class="info">
<text class="author">{{ data!.user_id!.length > 0 ? data!.user_id[0]!.nickname : '' }}</text>
<text class="publish_date">{{ publishTime(data?.publish_date ?? 0) }}</text>
</view>
</view>
<image class="thumbnail" :src="data!.thumbnail[0]" mode="aspectFill"></image>
</view>
</template>
<script lang="uts">
import { type PropType } from 'vue'
import translatePublishTime from "@/uni_modules/uni-cms-article/common/publish-time.uts";
type ArticleAuthor = {
_id: string
nickname: string
}
type ArticleItem = {
_id: string
title: string
publish_date: number
thumbnail: string[]
user_id: ArticleAuthor[]
}
export default {
name: "right-small-cover",
props: {
data: {
type: Object as PropType<ArticleItem>
}
},
methods: {
// 格式化时间戳
publishTime(timestamp: number): string {
return translatePublishTime(timestamp)
},
}
}
</script>
<style scoped lang="scss">
@import "./style.scss";
</style>