@monkeyplus/flow 6.0.99 → 6.0.101
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.
|
@@ -19,8 +19,18 @@ function getEnvFlowImagesRuntimeConfig() {
|
|
|
19
19
|
}
|
|
20
20
|
function getFlowImagesRuntimeConfig() {
|
|
21
21
|
try {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const fromNitro = globalThis.__nitro__?.runtimeConfig?.flow?.images;
|
|
23
|
+
if (fromNitro) return fromNitro;
|
|
24
|
+
const fromGlobal = globalThis.useRuntimeConfig?.()?.flow?.images;
|
|
25
|
+
if (fromGlobal) return fromGlobal;
|
|
26
|
+
let fromImport;
|
|
27
|
+
try {
|
|
28
|
+
fromImport = typeof useRuntimeConfig !== "undefined" ? useRuntimeConfig()?.flow?.images : void 0;
|
|
29
|
+
} catch (e) {
|
|
30
|
+
}
|
|
31
|
+
if (fromImport) return fromImport;
|
|
32
|
+
return getEnvFlowImagesRuntimeConfig();
|
|
33
|
+
} catch (err) {
|
|
24
34
|
return getEnvFlowImagesRuntimeConfig();
|
|
25
35
|
}
|
|
26
36
|
}
|
|
@@ -41,6 +51,7 @@ export function getFlowImageBootPayload(config = getFlowImagesRuntimeConfig()) {
|
|
|
41
51
|
}
|
|
42
52
|
export function getFlowImageRuntimeUtils(config = getFlowImagesRuntimeConfig()) {
|
|
43
53
|
if (!config) {
|
|
54
|
+
console.log("[Flow] getFlowImageRuntimeUtils: config is falsy! Returning undefined.");
|
|
44
55
|
return void 0;
|
|
45
56
|
}
|
|
46
57
|
const cacheKey = JSON.stringify(config);
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (nitroApp: any): void;
|
|
@@ -149,6 +149,7 @@ export default defineComponent({
|
|
|
149
149
|
if (options.value.lazy && !props.sync && !imgAttrs.loading) {
|
|
150
150
|
imgAttrs.loading = "lazy";
|
|
151
151
|
}
|
|
152
|
+
console.log("imgAttrs.....", imgAttrs);
|
|
152
153
|
const children = [];
|
|
153
154
|
if (fallbackSource) {
|
|
154
155
|
children.push(h("source", {
|