feat: 为项目标题添加可点击链接功能
This commit is contained in:
@@ -40,7 +40,20 @@
|
||||
</el-icon>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="title" label="项目名称" min-width="150" />
|
||||
<el-table-column label="项目名称" min-width="150">
|
||||
<template #default="scope">
|
||||
<a
|
||||
v-if="scope.row.url"
|
||||
:href="scope.row.url"
|
||||
target="_blank"
|
||||
class="project-link"
|
||||
@click.stop
|
||||
>
|
||||
{{ scope.row.title }}
|
||||
</a>
|
||||
<span v-else>{{ scope.row.title }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="source" label="来源" min-width="80" />
|
||||
<el-table-column prop="publishDate" label="发布日期" width="95">
|
||||
<template #default="scope">
|
||||
@@ -102,8 +115,21 @@
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-table :data="bidsByDateRange" style="width: 100%" size="small" class="bids-table">
|
||||
<el-table-column prop="title" label="项目名称" min-width="150" />
|
||||
<el-table-column prop="source" label="来源" min-width="80" />
|
||||
<el-table-column label="项目名称" min-width="150">
|
||||
<template #default="scope">
|
||||
<a
|
||||
v-if="scope.row.url"
|
||||
:href="scope.row.url"
|
||||
target="_blank"
|
||||
class="project-link"
|
||||
@click.stop
|
||||
>
|
||||
{{ scope.row.title }}
|
||||
</a>
|
||||
<span v-else>{{ scope.row.title }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="source" label="来源" width="80" />
|
||||
<el-table-column prop="publishDate" label="发布日期" width="95">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.publishDate) }}
|
||||
@@ -416,6 +442,17 @@ const togglePin = async (item: AIRecommendation) => {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.project-link {
|
||||
color: var(--el-text-color-primary);
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.project-link:hover {
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
|
||||
Reference in New Issue
Block a user