[U] Update model
This commit is contained in:
@@ -9,11 +9,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<img id="title-image" :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="content"></div>
|
||||||
<div class="tags" v-if="!tagOnTop">
|
<div class="tags" v-if="!tagOnTop">
|
||||||
<Tag v-for="t in meta.tags" :key="t">{{t}}</Tag>
|
<Tag v-for="t in meta.tags" :key="t">{{t}}</Tag>
|
||||||
</div>
|
</div>
|
||||||
<div id="expand" v-if="meta.more_content">展开...</div>
|
<!-- <div id="expand" v-if="meta.more_content">展开...</div>-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -31,8 +31,7 @@ export interface BlogPostMeta
|
|||||||
file: string
|
file: string
|
||||||
date: string
|
date: string
|
||||||
|
|
||||||
preview: string
|
content: string
|
||||||
more_content: string
|
|
||||||
|
|
||||||
subtitle?: string
|
subtitle?: string
|
||||||
title_image?: string
|
title_image?: string
|
||||||
@@ -56,7 +55,7 @@ export default class BlogPostPreview extends Vue
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get preview(): string { return marked(this.meta.preview) }
|
get content(): string { return marked(this.meta.content) }
|
||||||
|
|
||||||
get image(): string | null
|
get image(): string | null
|
||||||
{ return this.meta.title_image ? hosts.content + '/' + this.meta.title_image : null }
|
{ return this.meta.title_image ? hosts.content + '/' + this.meta.title_image : null }
|
||||||
|
|||||||
Reference in New Issue
Block a user