Skip to content

Commit

Permalink
fix: typescript typing issue for Post
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyxguo committed Jul 19, 2023
1 parent e85109a commit 1c58e55
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
9 changes: 5 additions & 4 deletions src/models/Post.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@ export class Post {
categories: Category[] = []
tags: Tag[] = []
min_tags: Tag[] = []
count_time = {}
count_time: { symbolsTime?: string; symbolsCount?: number } = {}
toc = ''
next_post = {}
prev_post = {}
next_post: { title?: string } = {}
prev_post: { title?: string } = {}
author = {
name: '',
avatar: '',
link: ''
link: '',
slug: ''
}
feature = false
pinned = false
Expand Down
14 changes: 3 additions & 11 deletions src/views/Post.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@
v-if="post.count_time.symbolsTime && post.date"
>
<span>
<SvgIcon icon-class="clock-outline" style="stroke: white" />
<SvgIcon icon-class="clock-outline" stroke="var(--text-white)" />
<span class="pl-2 opacity-70">
{{ post.count_time.symbolsTime }}
</span>
</span>
<span>
<SvgIcon icon-class="text-outline" style="stroke: white" />
<SvgIcon icon-class="text-outline" stroke="var(--text-white)" />
<span class="pl-2 opacity-70">
{{ post.count_time.symbolsCount }}
</span>
Expand Down Expand Up @@ -131,15 +131,7 @@
</template>
<div
v-else
class="
bg-ob-deep-800
px-14
py-16
rounded-2xl
shadow-xl
block
min-h-screen
"
class="bg-ob-deep-800 px-14 py-16 rounded-2xl shadow-xl block min-h-screen"
>
<ob-skeleton
tag="div"
Expand Down

0 comments on commit 1c58e55

Please sign in to comment.