Files
site-10584/components/CmsArticleList.vue
2026-01-29 10:43:43 +08:00

33 lines
945 B
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script setup lang="ts">
import {detail} from "~/utils/common";
import dayjs from "dayjs";
const props = withDefaults(
defineProps<{
data?: any;
}>(),
{}
);
</script>
<template>
<template v-if="data" v-for="(item,index) in data" key="index">
<li class="clearfix">
<a :href="detail(item)" class="n-left fl">
<el-image :src="item.image" :fit="`scale-down`" class="w-[240px] h-[158px]" :alt="item.title" />
</a>
<div class="n-right fr">
<h3><a :href="detail(item)" :title="item.title">{{ item.title }}</a></h3>
<div v-html="item.comments" class="line-clamp-2"></div>
<div class="date">{{ $t('createTime') }}{{ dayjs(item.createTime).format('YYYY-MM-DD') }}</div>
<div class="n-more" ><a :href="detail(item)" >{{ $t('seeMore') }}>></a></div>
</div>
</li>
</template>
<div class="clearboth"></div>
</template>
<style scoped lang="scss">
</style>