diff --git a/components/TimeLine.vue b/components/TimeLine.vue
index 0a47c3b..deaab97 100644
--- a/components/TimeLine.vue
+++ b/components/TimeLine.vue
@@ -6,7 +6,7 @@
{{item.year}}
-
- {{dateFormat(new Date(subItem.frontmatter.date))}}
+ {{dateFormat(subItem.frontmatter.date)}}
{{subItem.title}}
@@ -75,6 +75,8 @@ export default {
},
// 时间格式化
dateFormat (date, type) {
+ date = date.replace(/-/g,'/')
+ const dateObj = new Date(date)
const dateObj = new Date(date)
const year = dateObj.getFullYear()
const mon = dateObj.getMonth() + 1