优化文章页显示

This commit is contained in:
jacky 2024-05-18 14:38:32 +08:00
parent dc1a5bce85
commit edae8ffc74
1 changed files with 15 additions and 9 deletions

View File

@ -44,21 +44,26 @@
<div class="gva-table-box"> <div class="gva-table-box">
<!-- 由于此处菜单跟左侧列表一一对应所以不需要分页 pageSize默认999 --> <!-- 由于此处菜单跟左侧列表一一对应所以不需要分页 pageSize默认999 -->
<el-table ref="multipleTable" :data="tableData" row-key="ID"> <el-table ref="multipleTable" :data="tableData" row-key="ID">
<el-table-column align="left" label="ID" min-width="60" prop="ID" /> <el-table-column fixed align="left" label="ID" min-width="60" prop="ID" />
<el-table-column align="left" label="标题" min-width="300" prop="title"> <el-table-column align="left" label="标题" min-width="320" prop="title">
<template #default="scope"> <template #default="scope">
<p> <p>
<el-text tag="b">{{ scope.row.title }}</el-text> <el-text tag="b">{{ scope.row.title }}</el-text>
<el-link v-if="scope.row.sourceUrl != ''" type="primary" :href="scope.row.sourceUrl" target="_blank">
<el-icon>
<Link />
</el-icon>
查看原文
</el-link>
</p> </p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="left" label="来源" min-width="240" prop="source" /> <el-table-column align="left" label="查看原文" min-width="140" prop="source">
<template #default="scope">
<el-link v-if="scope.row.sourceUrl != ''" type="primary" :href="scope.row.sourceUrl" target="_blank">
<el-icon>
<Link />
</el-icon>
查看原文
</el-link>
<el-text v-else></el-text>
</template>
</el-table-column>
<el-table-column align="left" label="来源" min-width="200" prop="source" />
<el-table-column align="left" label="作者" min-width="100" prop="author" /> <el-table-column align="left" label="作者" min-width="100" prop="author" />
<el-table-column align="left" label="采集时间" min-width="160" prop="createtime"> <el-table-column align="left" label="采集时间" min-width="160" prop="createtime">
<template #default="scope"> <template #default="scope">
@ -97,6 +102,7 @@
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import RichView from '@/components/richtext/rich-view.vue'
import { formatDate } from '@/utils/format' import { formatDate } from '@/utils/format'
import { formatTimeToStr } from '@/utils/date' import { formatTimeToStr } from '@/utils/date'
import { getFetcherArticleList } from '@/api/fetcher' import { getFetcherArticleList } from '@/api/fetcher'