@afeefa/vue-app 0.0.146 → 0.0.147
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.147
|
package/package.json
CHANGED
@@ -52,6 +52,8 @@ export class ApiAction extends ApiResourcesApiAction {
|
|
52
52
|
}
|
53
53
|
|
54
54
|
async beforeBulkRequest () {
|
55
|
+
this._startTime = Date.now()
|
56
|
+
|
55
57
|
if (this._dispatchGlobalLoadingEvents) {
|
56
58
|
eventBus.dispatch(new LoadingEvent(LoadingEvent.START_LOADING))
|
57
59
|
}
|
@@ -80,6 +82,14 @@ export class ApiAction extends ApiResourcesApiAction {
|
|
80
82
|
}
|
81
83
|
|
82
84
|
async afterBulkRequest () {
|
85
|
+
if (this._minDuration) {
|
86
|
+
const diffTime = Date.now() - this._startTime
|
87
|
+
const restTime = Math.max(0, this._minDuration - diffTime)
|
88
|
+
if (restTime) {
|
89
|
+
await sleep(restTime / 1000)
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
83
93
|
if (this._dispatchGlobalLoadingEvents) {
|
84
94
|
eventBus.dispatch(new LoadingEvent(LoadingEvent.STOP_LOADING))
|
85
95
|
}
|