vueless 0.0.463 → 0.0.464
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
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script setup>
|
|
8
|
-
import { computed, onBeforeUnmount, watch, ref, onMounted, onUnmounted } from "vue";
|
|
8
|
+
import { computed, onBeforeUnmount, watch, ref, onMounted, onUnmounted, watchEffect } from "vue";
|
|
9
9
|
|
|
10
10
|
import { getDefault } from "../utils/utilUI.js";
|
|
11
11
|
import { isMobileApp } from "../utils/utilPlatform.js";
|
|
@@ -35,6 +35,14 @@ const props = defineProps({
|
|
|
35
35
|
type: [String, Array],
|
|
36
36
|
default: "",
|
|
37
37
|
},
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Loader state (shown / hidden).
|
|
41
|
+
*/
|
|
42
|
+
loading: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: getDefault(defaultConfig, ULoaderProgress).loading,
|
|
45
|
+
},
|
|
38
46
|
});
|
|
39
47
|
|
|
40
48
|
const error = ref(false);
|
|
@@ -85,6 +93,17 @@ onUnmounted(() => {
|
|
|
85
93
|
window.removeEventListener("loaderProgressOff", setLoaderOffHandler);
|
|
86
94
|
});
|
|
87
95
|
|
|
96
|
+
watchEffect(() => {
|
|
97
|
+
if (props.loading) {
|
|
98
|
+
show.value = true;
|
|
99
|
+
start();
|
|
100
|
+
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
done();
|
|
105
|
+
});
|
|
106
|
+
|
|
88
107
|
function setLoaderOnHandler(event) {
|
|
89
108
|
loaderProgressOn(event.detail.resource);
|
|
90
109
|
}
|
|
@@ -113,7 +132,7 @@ function onChangeRequestsQueue() {
|
|
|
113
132
|
|
|
114
133
|
if (isActiveRequests && !isStarted.value) {
|
|
115
134
|
start();
|
|
116
|
-
} else if (!isActiveRequests && isStarted.value && show.value) {
|
|
135
|
+
} else if (!isActiveRequests && isStarted.value && show.value && !props.loading) {
|
|
117
136
|
done();
|
|
118
137
|
}
|
|
119
138
|
} else {
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "vueless",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.464",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -6303,6 +6303,15 @@
|
|
|
6303
6303
|
"type": "string|array"
|
|
6304
6304
|
},
|
|
6305
6305
|
"default": "\"\""
|
|
6306
|
+
},
|
|
6307
|
+
{
|
|
6308
|
+
"name": "loading",
|
|
6309
|
+
"description": "Loader state (shown / hidden).",
|
|
6310
|
+
"value": {
|
|
6311
|
+
"kind": "expression",
|
|
6312
|
+
"type": "boolean"
|
|
6313
|
+
},
|
|
6314
|
+
"default": "false"
|
|
6306
6315
|
}
|
|
6307
6316
|
],
|
|
6308
6317
|
"source": {
|