mirror of
https://github.com/ipfs/ipfs-blog.git
synced 2026-08-06 17:03:23 +02:00
fix: fix dayjs date format (#87)
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
|
||||
<script>
|
||||
import dayjs from 'dayjs'
|
||||
import utc from 'dayjs/plugin/utc'
|
||||
import Breadcrumbs from '@theme/components/Breadcrumbs'
|
||||
import LazyImage from '@theme/components/base/LazyImage'
|
||||
import PostAuthor from '@theme/components/blog/PostAuthor'
|
||||
@@ -90,9 +91,10 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
resolvedDate() {
|
||||
return dayjs(this.date).format(
|
||||
this.$themeLocaleConfig.dateFormat || 'YYYY-MM-DD'
|
||||
)
|
||||
dayjs.extend(utc)
|
||||
return dayjs
|
||||
.utc(this.date)
|
||||
.format(this.$themeLocaleConfig.dateFormat || 'YYYY-MM-DD')
|
||||
},
|
||||
resolvedTags() {
|
||||
if (!this.tags || Array.isArray(this.tags)) return this.tags
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
|
||||
<script>
|
||||
import dayjs from 'dayjs'
|
||||
import utc from 'dayjs/plugin/utc'
|
||||
import PostTag from '@theme/components/blog/PostTag'
|
||||
import PostAuthor from '@theme/components/blog/PostAuthor'
|
||||
import UnstyledLink from '@theme/components/UnstyledLink'
|
||||
@@ -115,9 +116,10 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
resolvedDate() {
|
||||
return dayjs(this.date).format(
|
||||
this.$themeLocaleConfig.dateFormat || 'YYYY-MM-DD'
|
||||
)
|
||||
dayjs.extend(utc)
|
||||
return dayjs
|
||||
.utc(this.date)
|
||||
.format(this.$themeLocaleConfig.dateFormat || 'YYYY-MM-DD')
|
||||
},
|
||||
resolvedTags() {
|
||||
if (!this.tags || Array.isArray(this.tags)) return this.tags
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
import dayjs from 'dayjs'
|
||||
import utc from 'dayjs/plugin/utc'
|
||||
import UnstyledLink from '@theme/components/UnstyledLink'
|
||||
import PostSocials from '@theme/components/blog/PostSocials.vue'
|
||||
import PostTag from '@theme/components/blog/PostTag'
|
||||
@@ -120,9 +121,10 @@ export default {
|
||||
: `https://www.youtube.com/embed/${id}?${start ? `start=${start}` : ''}`
|
||||
},
|
||||
resolvedDate() {
|
||||
return dayjs(this.videoModalCard.date).format(
|
||||
this.$themeLocaleConfig.dateFormat || 'YYYY-MM-DD'
|
||||
)
|
||||
dayjs.extend(utc)
|
||||
return dayjs
|
||||
.utc(this.date)
|
||||
.format(this.$themeLocaleConfig.dateFormat || 'YYYY-MM-DD')
|
||||
},
|
||||
resolvedTags() {
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user