@mixd-id/web-scaffold 0.1.240411019 → 0.1.240411021
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/components/Image.vue
CHANGED
|
@@ -191,7 +191,13 @@ export default{
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
if(Array.isArray(this.src)){
|
|
194
|
-
|
|
194
|
+
let imgSrc
|
|
195
|
+
for(let i = this.$device.mediaIndex ; i >= 0 ; i--){
|
|
196
|
+
if(this.src[i]){
|
|
197
|
+
imgSrc = this.src[i]
|
|
198
|
+
break
|
|
199
|
+
}
|
|
200
|
+
}
|
|
195
201
|
setSrc(imgSrc)
|
|
196
202
|
}
|
|
197
203
|
else if(this.src){
|
package/src/mixin/component.js
CHANGED
|
@@ -272,6 +272,15 @@ export const componentMixin = {
|
|
|
272
272
|
document.body.appendChild(guide)
|
|
273
273
|
},
|
|
274
274
|
|
|
275
|
+
imageSrc(url){
|
|
276
|
+
if(typeof url === 'string'){
|
|
277
|
+
if(url.indexOf('://') < 0 && url.substring(0, 1) !== '/'){
|
|
278
|
+
url = ((import.meta.env.VITE_IMAGE_HOST ?? '') + '/' + url)
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
return url
|
|
282
|
+
}
|
|
283
|
+
|
|
275
284
|
},
|
|
276
285
|
|
|
277
286
|
mounted(){
|