首页列表展示完成80%
This commit is contained in:
@@ -1,30 +1,30 @@
|
||||
<template>
|
||||
<div class="ProjectList">
|
||||
<div class="projectIco">
|
||||
<img src="../assets/images/touxiang.png" style="width: 5vw;height: 5vw;margin-left: 10px;border-radius: 10px">
|
||||
<img :src="projectLists.projectIco" style="width: 5vw;height: 5vw;margin-left: 10px;border-radius: 10px">
|
||||
</div>
|
||||
<div style="height: 12vh;margin-left: 5px;width: auto;display: flex;flex-direction: column;justify-content: space-between">
|
||||
<div class="ProjectTitle">
|
||||
<span>由密码学专家团队打造的开源隐私计算平台</span>
|
||||
<span>{{projectLists.projectTitle}}</span>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<span style="font-size: 1rem">随着《数据安全法》和《个人信息保护法》的相继颁布,隐私计算技术在近两..</span>
|
||||
<span style="font-size: 1rem">{{brief}}</span>
|
||||
</div>
|
||||
<div class="other">
|
||||
<div class="otherInfo">
|
||||
<div class="projectName">
|
||||
<span style="color: #59A3A4">primihub</span><span style="color: rgb(156 163 175);"> • </span>
|
||||
<span style="color: #59A3A4">{{ projectLists.projectName }}</span><span style="color: rgb(156 163 175);"> • </span>
|
||||
</div>
|
||||
<div>
|
||||
<div style="margin-left: 10px;width: 10px;height: 10px;border-radius: 50%;background-color: #ffba00"></div>
|
||||
</div>
|
||||
<el-tag size="mini" style="margin-left: 5px">C++</el-tag><span style="color: rgb(156 163 175);margin-left: 5px"> • </span>
|
||||
<div style="margin-left: 10px">
|
||||
<span style="color: rgb(156 163 175); ">2023-6-30</span>
|
||||
<span style="color: rgb(156 163 175); ">{{ formatTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lookCount">
|
||||
<i class="el-icon-view" style="color: rgb(156 163 175);"></i><span style="margin-left: 5px;color: rgb(156 163 175); ">1.3k</span>
|
||||
<i class="el-icon-view" style="color: rgb(156 163 175);"></i><span style="margin-left: 5px;color: rgb(156 163 175); ">{{ projectLists.lookCount }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,17 +43,18 @@ export default {
|
||||
computed: {
|
||||
// 对时间进行格式化
|
||||
formatTime: function() {
|
||||
if (this.article) {
|
||||
const dt = new Date(this.article.time)
|
||||
if (this.projectLists) {
|
||||
const dt = new Date(this.projectLists.submitTime)
|
||||
const year=dt.getFullYear()
|
||||
const month = dt.getMonth()
|
||||
const date = dt.getDate()
|
||||
return `${month}月${date}日`
|
||||
return `${year}-${month}-${date}`
|
||||
}
|
||||
return '';
|
||||
},
|
||||
// 截取文章内容的前 35 个字,并加上省略号
|
||||
brief: function() {
|
||||
return this.projectLists.content.substr(0, 35) + '...';
|
||||
return this.projectLists.projectDescription.substr(0, 35) + '...';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user