33 lines
896 B
Vue
33 lines
896 B
Vue
<script setup lang="ts">
|
|
import {detail} from "~/utils/common";
|
|
import dayjs from "dayjs";
|
|
|
|
const props = withDefaults(
|
|
defineProps<{
|
|
data?: any;
|
|
}>(),
|
|
{}
|
|
);
|
|
|
|
</script>
|
|
|
|
<template>
|
|
<el-row :gutter="20">
|
|
<template v-for="(item,index) in data" key="index">
|
|
<el-col :span="16" class="my-3">
|
|
<div class="item p-2 border-1 border-gray-200 border-solid hover:border-blue-500">
|
|
<a :href="detail(item)" :title="item.title" class="img"><el-image :fit="`scale-down`" :src="item.image" :alt="item.title" /></a>
|
|
<h3>
|
|
<a :href="detail(item)" :title="item.title" class="text-lg font-bold">{{ item.title }}</a>
|
|
<span class="line-clamp-2 text-gray-400 text-sm font-normal py-3">{{ item.comments }}</span>
|
|
</h3>
|
|
</div>
|
|
</el-col>
|
|
</template>
|
|
</el-row>
|
|
</template>
|
|
|
|
<style scoped lang="scss">
|
|
|
|
</style>
|