File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 86
86
<el-timeline-item
87
87
v-for =" (item,index) in dataTimeline"
88
88
:key =" index"
89
- timestamp =" 2018/4/12 "
89
+ : timestamp =" item.from "
90
90
placement =" top"
91
91
>
92
92
<el-card >
@@ -116,6 +116,7 @@ export default {
116
116
<script setup>
117
117
import { ref } from ' vue'
118
118
import { Commits , Members } from ' @/api/github'
119
+ import {formatTimeToStr } from " @/utils/date" ;
119
120
const page = ref (0 )
120
121
121
122
const loadMore = () => {
@@ -129,7 +130,7 @@ const loadCommits = () => {
129
130
data .forEach ((element ) => {
130
131
if (element .commit .message ) {
131
132
dataTimeline .value .push ({
132
- from: new Date (element .commit .author .date ),
133
+ from: formatTimeToStr (element .commit .author .date , ' yyyy-MM-dd ' ),
133
134
title: element .commit .author .name ,
134
135
showDayAndMonth: true ,
135
136
message: element .commit .message ,
You can’t perform that action at this time.
0 commit comments