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