mirror of https://github.com/halo-dev/halo
feat: support img lazy load.
parent
952176518e
commit
3531d58ac7
|
@ -107,6 +107,7 @@
|
|||
<img
|
||||
:src="item.thumbPath"
|
||||
v-show="handleJudgeMediaType(item)"
|
||||
loading="lazy"
|
||||
>
|
||||
</div>
|
||||
<a-card-meta style="padding: 0.8rem;">
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
:src="attachment.path"
|
||||
v-show="photoPreviewVisible"
|
||||
style="width: 100%;"
|
||||
loading="lazy"
|
||||
>
|
||||
</a>
|
||||
<d-player
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
<img
|
||||
:src="item.thumbPath"
|
||||
v-show="handleJudgeMediaType(item)"
|
||||
loading="lazy"
|
||||
>
|
||||
</div>
|
||||
</a-col>
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
<img
|
||||
:src="item.thumbPath"
|
||||
v-show="handleJudgeMediaType(item)"
|
||||
loading="lazy"
|
||||
>
|
||||
</div>
|
||||
</a-col>
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
<img
|
||||
:alt="item.name"
|
||||
:src="item.screenshots"
|
||||
loading="lazy"
|
||||
>
|
||||
</div>
|
||||
<template
|
||||
|
|
|
@ -170,9 +170,6 @@ export default {
|
|||
if (!this.postToStage.title) {
|
||||
this.postToStage.title = moment(new Date()).format('YYYY-MM-DD-HH-mm-ss')
|
||||
}
|
||||
if (!this.postToStage.originalContent) {
|
||||
this.postToStage.originalContent = '开始编辑...'
|
||||
}
|
||||
if (this.postToStage.id) {
|
||||
// Update the post
|
||||
postApi.update(this.postToStage.id, this.postToStage, false).then(response => {
|
||||
|
|
|
@ -394,13 +394,6 @@ export default {
|
|||
})
|
||||
return
|
||||
}
|
||||
if (!this.selectedPost.originalContent) {
|
||||
this.$notification['error']({
|
||||
message: '提示',
|
||||
description: '文章内容不能为空!'
|
||||
})
|
||||
return
|
||||
}
|
||||
// Set category ids
|
||||
this.selectedPost.categoryIds = this.selectedCategoryIds
|
||||
// Set tag ids
|
||||
|
|
|
@ -152,9 +152,6 @@ export default {
|
|||
if (!this.sheetToStage.title) {
|
||||
this.sheetToStage.title = moment(new Date()).format('YYYY-MM-DD-HH-mm-ss')
|
||||
}
|
||||
if (!this.sheetToStage.originalContent) {
|
||||
this.sheetToStage.originalContent = '开始编辑...'
|
||||
}
|
||||
if (this.sheetToStage.id) {
|
||||
sheetApi.update(this.sheetToStage.id, this.sheetToStage, false).then(response => {
|
||||
this.$log.debug('Updated sheet', response.data.data)
|
||||
|
|
|
@ -210,13 +210,6 @@ export default {
|
|||
})
|
||||
return
|
||||
}
|
||||
if (!this.selectedSheet.originalContent) {
|
||||
this.$notification['error']({
|
||||
message: '提示',
|
||||
description: '页面内容不能为空!'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.selectedSheet.id) {
|
||||
sheetApi.update(this.selectedSheet.id, this.selectedSheet, autoSave).then(response => {
|
||||
this.$log.debug('Updated sheet', response.data.data)
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
@click="showDrawer(item)"
|
||||
>
|
||||
<div class="photo-thumb">
|
||||
<img :src="item.thumbnail">
|
||||
<img :src="item.thumbnail" loading="lazy">
|
||||
</div>
|
||||
<a-card-meta>
|
||||
<ellipsis
|
||||
|
|
Loading…
Reference in New Issue