@mixd-id/web-scaffold 0.1.240411019 → 0.1.240411020
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 +1 -1
- package/src/mixin/component.js +9 -0
package/package.json
CHANGED
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(){
|