[+] Display tags
This commit is contained in:
@@ -5,8 +5,11 @@
|
|||||||
<div id="title">{{meta.title}}</div>
|
<div id="title">{{meta.title}}</div>
|
||||||
<div id="subtitle" v-if="meta.subtitle">{{meta.subtitle}}</div>
|
<div id="subtitle" v-if="meta.subtitle">{{meta.subtitle}}</div>
|
||||||
</div>
|
</div>
|
||||||
<img :src="image" v-if="image" alt="Title Image">
|
<img id="title-image" :src="image" v-if="image" alt="Title Image">
|
||||||
<div id="preview" class="markdown-content" v-html="preview"></div>
|
<div id="preview" class="markdown-content" v-html="preview"></div>
|
||||||
|
<div id="tags">
|
||||||
|
<Tag v-for="t in meta.tags" :key="t">{{t}}</Tag>
|
||||||
|
</div>
|
||||||
<div id="expand" v-if="meta.more_content">展开...</div>
|
<div id="expand" v-if="meta.more_content">展开...</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -16,6 +19,7 @@ import {Options, Vue} from 'vue-class-component';
|
|||||||
import {Prop} from "vue-property-decorator";
|
import {Prop} from "vue-property-decorator";
|
||||||
import {hosts} from "@/scripts/constants";
|
import {hosts} from "@/scripts/constants";
|
||||||
import {marked} from "marked";
|
import {marked} from "marked";
|
||||||
|
import Tag from "@/components/Tag.vue";
|
||||||
|
|
||||||
export interface BlogPostMeta
|
export interface BlogPostMeta
|
||||||
{
|
{
|
||||||
@@ -31,7 +35,7 @@ export interface BlogPostMeta
|
|||||||
title_image?: string
|
title_image?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
@Options({components: {}})
|
@Options({components: {Tag}})
|
||||||
export default class BlogPostPreview extends Vue
|
export default class BlogPostPreview extends Vue
|
||||||
{
|
{
|
||||||
@Prop({required: true}) meta!: BlogPostMeta
|
@Prop({required: true}) meta!: BlogPostMeta
|
||||||
|
|||||||
Reference in New Issue
Block a user