Skip to content

Commit 51d2c04

Browse files
author
Amr Hamdy
committed
feat: add apiVersion config
1 parent 2a58506 commit 51d2c04

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,28 @@ Note: this will disregard your token above as this should be built into the CNAM
200200

201201
Your image folder on server, this alows to shorten your origin image URLs.
202202

203+
### apiVersion
204+
205+
###### Type: **String** |Default: **'v7'** | _optional_
206+
207+
Allow to use a specific version of API.
208+
209+
- set a specific version of API
210+
```javascript
211+
const cloudimageConfig = {
212+
token: 'demo',
213+
baseURL: 'https://jolipage.airstore.io/',
214+
apiVersion: 'v7' // optional
215+
};
216+
```
217+
- disable API version
218+
```javascript
219+
const cloudimageConfig = {
220+
token: 'demo',
221+
baseURL: 'https://jolipage.airstore.io/',
222+
apiVersion: null // optional
223+
};
224+
```
203225
### doNotReplaceURL
204226

205227
###### Type: **bool** | Default: **false**

examples/src/App.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@
420420
position: relative;
421421
"
422422
>
423-
<img src="https://doc.cloudimg.io/v7/sample.li/boat.jpg" />
423+
<img src="https://doc.cloudimg.io/sample.li/boat.jpg" />
424424
<div class="border-box" />
425425
</div>
426426
</div>
@@ -781,7 +781,7 @@ export default {
781781
/>`,
782782
syntaxHighlight2: `<div style=" width: 200px, height: 200px ">
783783
<img
784-
src="https://doc.cloudimg.io/v7/sample.li/boat.jpg"
784+
src="https://doc.cloudimg.io/sample.li/boat.jpg"
785785
/>
786786
</div>`,
787787
syntaxHighlight3: `<div style=" width: 200px, height: 200px ">

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"publish-demo": "npm run build-demo && npm run deploy"
3737
},
3838
"dependencies": {
39-
"cloudimage-responsive-utils": "^2.3.0",
39+
"cloudimage-responsive-utils": "^2.4.0",
4040
"core-js": "^3.6.5",
4141
"throttle-debounce": "^2.2.1"
4242
},

src/CloudImageProvider.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export default {
3131
xl: '(min-width: 1200px)' // from 1200 USUALSCREEN
3232
},
3333
params: this.cloudImageConfig.params? processParams(this.cloudImageConfig.params) :'org_if_sml=1',
34+
apiVersion: 'v7',
3435
imageSizeAttributes: this.cloudImageConfig.imageSizeAttributes || 'use',
3536
innerWidth: typeof window !== 'undefined' ? window.innerWidth : null,
3637
previewQualityFactor: 10,

0 commit comments

Comments
 (0)