From ba325be1699edfd32e78dc193af65cb99a5ecaa0 Mon Sep 17 00:00:00 2001 From: jmestxr Date: Fri, 8 Sep 2023 15:41:33 +0800 Subject: [PATCH 1/5] Remove option to lazy/eager load images --- packages/vue-components/src/Pic.vue | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/vue-components/src/Pic.vue b/packages/vue-components/src/Pic.vue index cab92c3656..2d17bba5a4 100644 --- a/packages/vue-components/src/Pic.vue +++ b/packages/vue-components/src/Pic.vue @@ -6,7 +6,6 @@ :alt="alt" :width="computedWidth" class="img-fluid rounded" - :loading="computedLoadType" @load.once="computeWidth" /> @@ -36,10 +35,6 @@ export default { type: String, default: '', }, - eager: { - type: Boolean, - default: false, - }, addClass: { type: String, default: '', @@ -58,9 +53,6 @@ export default { } return this.widthFromHeight; }, - computedLoadType() { - return this.eager ? 'eager' : 'lazy'; - }, }, data() { return { From a7266307e9b7eae0307eebceae11d4613b455e3b Mon Sep 17 00:00:00 2001 From: jmestxr Date: Fri, 8 Sep 2023 15:46:46 +0800 Subject: [PATCH 2/5] Update docs to remove 'eager' prop --- docs/userGuide/syntax/pictures.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/userGuide/syntax/pictures.md b/docs/userGuide/syntax/pictures.md index f40fada482..e449e5b140 100644 --- a/docs/userGuide/syntax/pictures.md +++ b/docs/userGuide/syntax/pictures.md @@ -22,7 +22,6 @@ alt | `string` | | **This must be specified.**
The alternative text of the im height | `string` | | The height of the image in pixels. src | `string` | | **This must be specified.**
The URL of the image.
The URL can be specified as absolute or relative references. More info in: _[Intra-Site Links]({{baseUrl}}/userGuide/formattingContents.html#intraSiteLinks)_ width | `string` | | The width of the image in pixels.
If both width and height are specified, width takes priority over height. It is to maintain the image's aspect ratio. -eager | `boolean` | false | The `` component lazy loads its images by default.
If you want to eagerly load the images, simply specify this attribute.
From c598cdcf451191e62ca04e2c5b95ca81dbbdd4ab Mon Sep 17 00:00:00 2001 From: jmestxr Date: Fri, 8 Sep 2023 15:49:07 +0800 Subject: [PATCH 3/5] Update docs --- docs/userGuide/syntax/pictures.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/userGuide/syntax/pictures.md b/docs/userGuide/syntax/pictures.md index e449e5b140..22ed0fddaf 100644 --- a/docs/userGuide/syntax/pictures.md +++ b/docs/userGuide/syntax/pictures.md @@ -8,10 +8,6 @@ MarkBind Logo - - - MarkBind Logo - From f4331207e09325f5d17836589f06149d4763f3cc Mon Sep 17 00:00:00 2001 From: jmestxr Date: Fri, 8 Sep 2023 16:03:45 +0800 Subject: [PATCH 4/5] Remove option to lazy/eager load image in --- packages/vue-components/src/annotations/Annotate.vue | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/vue-components/src/annotations/Annotate.vue b/packages/vue-components/src/annotations/Annotate.vue index d44c7370d4..62235637c6 100644 --- a/packages/vue-components/src/annotations/Annotate.vue +++ b/packages/vue-components/src/annotations/Annotate.vue @@ -6,7 +6,6 @@ :alt="alt" :width="computedWidth" class="annotate-image" - :loading="computedLoadType" @load.once="getWidth" />
@@ -36,10 +35,6 @@ export default { type: String, default: '', }, - eager: { - type: Boolean, - default: false, - }, addClass: { type: String, default: '', @@ -58,9 +53,6 @@ export default { } return this.widthFromHeight; }, - computedLoadType() { - return this.eager ? 'eager' : 'lazy'; - }, }, data() { return { From b01fc617e2296bcb08c79c53978a8e5f3dfa0e3f Mon Sep 17 00:00:00 2001 From: jmestxr Date: Fri, 8 Sep 2023 16:08:31 +0800 Subject: [PATCH 5/5] Update docs --- docs/userGuide/syntax/annotations.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/userGuide/syntax/annotations.md b/docs/userGuide/syntax/annotations.md index 8011de1451..78aaa92c88 100644 --- a/docs/userGuide/syntax/annotations.md +++ b/docs/userGuide/syntax/annotations.md @@ -145,7 +145,6 @@ This is effectively the same as the options used for the [picture](#pictures) co | src | `string` | | **This must be specified.**
The URL of the image.
The URL can be specified as absolute or relative references. More info in: _[Intra-Site Links]({{baseUrl}}/userGuide/formattingContents.html#intraSiteLinks)_ | | height | `string` |`''`| The height of the image in pixels. | | width | `string` |`''`| The width of the image in pixels.
If both width and height are specified, width takes priority over height. It is to maintain the image's aspect ratio. | -| eager | `boolean` | false | The `` component lazy loads its images by default.
If you want to eagerly load the images, simply specify this attribute. |