Browse Source

fix-1657 前端增加展示新增加字段

tags/v1.22.3.2^2
wangjr 3 years ago
parent
commit
a4ad2cb7c8
1 changed files with 36 additions and 0 deletions
  1. +36
    -0
      web_src/js/components/ProAnalysis.vue

+ 36
- 0
web_src/js/components/ProAnalysis.vue View File

@@ -148,6 +148,31 @@
prop="contributor"
label="贡献者数"
align="center">
</el-table-column>
<el-table-column
prop="isMirror"
label="派生"
align="center">
<template slot-scope="scope">
{{scope.row.isMirror|changeType}}
</template>
</el-table-column>
<el-table-column
prop="isFork"
label="镜像"
align="center">
<template slot-scope="scope">
{{scope.row.isFork|changeType}}
</template>
</el-table-column>
<el-table-column
prop="createUnix"
label="项目创建时间"
width="120px"
align="center">
<template slot-scope="scope">
{{scope.row.createUnix|transformTimestamp}}
</template>
</el-table-column>
</el-table>
</div>
@@ -1140,6 +1165,17 @@
return " <a href=\" mailto:" + value.email + "class=\"circular ui button\">" +value.user+ "</a>"
}
},
transformTimestamp(timestamp){
let a = new Date(timestamp*1000);
const date = new Date(a);
const Y = date.getFullYear() + '/';
const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '/';
const D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate()) + ' ';
const h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours()) + ':';
const m = (date.getMinutes() <10 ? '0'+date.getMinutes() : date.getMinutes());
const dateString = Y + M + D + h + m ;//+ s;
return dateString;
},
},


Loading…
Cancel
Save