cosey 0.10.24 → 0.10.25
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useSlots, unref, computed, ref, useTemplateRef, mergeProps, watch, onMounted, onBeforeUnmount, resolveComponent, resolveDirective, createBlock, openBlock, Teleport, withDirectives, createElementBlock, normalizeStyle, normalizeClass, createCommentVNode, createElementVNode, createVNode, renderSlot, withCtx, createSlots, Fragment, renderList, vShow, normalizeProps, guardReactiveProps } from 'vue';
|
|
1
|
+
import { defineComponent, useSlots, unref, computed, ref, useTemplateRef, mergeProps, watch, onMounted, onBeforeUnmount, resolveComponent, resolveDirective, createBlock, openBlock, Teleport, withDirectives, createElementBlock, normalizeStyle, normalizeClass, createCommentVNode, createElementVNode, createVNode, renderSlot, withCtx, createSlots, Fragment, renderList, vShow, normalizeProps, guardReactiveProps, nextTick } from 'vue';
|
|
2
2
|
import { merge, get, cloneDeep } from 'lodash-es';
|
|
3
3
|
import { reactiveComputed, reactiveOmit } from '@vueuse/core';
|
|
4
4
|
import { useNamespace, useZIndex, ElButton, Mousewheel } from 'element-plus';
|
|
@@ -96,7 +96,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
96
96
|
[tableKeys.orderType]: mapOrderType[order]
|
|
97
97
|
} : null;
|
|
98
98
|
page.value = 1;
|
|
99
|
-
|
|
99
|
+
validateExecute();
|
|
100
100
|
};
|
|
101
101
|
const elTableProps = computed(() => {
|
|
102
102
|
return mergeProps(reactiveOmit(props, omittedTableProps), {
|
|
@@ -194,13 +194,21 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
194
194
|
elTableRef.value?.setScrollTop(0);
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
|
-
|
|
198
|
-
|
|
197
|
+
onError(err) {
|
|
198
|
+
console.error(err);
|
|
199
199
|
}
|
|
200
200
|
});
|
|
201
|
+
const validateExecute = async () => {
|
|
202
|
+
if (props.formProps && tableQueryRef.value) {
|
|
203
|
+
await tableQueryRef.value.validate();
|
|
204
|
+
await execute();
|
|
205
|
+
} else {
|
|
206
|
+
await execute();
|
|
207
|
+
}
|
|
208
|
+
};
|
|
201
209
|
onMounted(() => {
|
|
202
210
|
if (props.immediate && props.api) {
|
|
203
|
-
|
|
211
|
+
validateExecute();
|
|
204
212
|
}
|
|
205
213
|
});
|
|
206
214
|
const ns = useNamespace("table");
|
|
@@ -263,7 +271,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
263
271
|
page.value = 1;
|
|
264
272
|
};
|
|
265
273
|
const onPageChange = () => {
|
|
266
|
-
|
|
274
|
+
validateExecute();
|
|
267
275
|
};
|
|
268
276
|
const getPagination = () => {
|
|
269
277
|
return {
|
|
@@ -293,7 +301,9 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
293
301
|
const reload = () => {
|
|
294
302
|
if (!isFetching.value) {
|
|
295
303
|
reloading.value = true;
|
|
296
|
-
|
|
304
|
+
validateExecute().finally(() => {
|
|
305
|
+
reloading.value = false;
|
|
306
|
+
});
|
|
297
307
|
}
|
|
298
308
|
};
|
|
299
309
|
const innerExpandRowKeys = ref();
|
|
@@ -342,8 +352,9 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
342
352
|
};
|
|
343
353
|
const onReset = async () => {
|
|
344
354
|
if (!isFetching.value) {
|
|
355
|
+
await nextTick();
|
|
345
356
|
page.value = 1;
|
|
346
|
-
await
|
|
357
|
+
await validateExecute();
|
|
347
358
|
}
|
|
348
359
|
};
|
|
349
360
|
const submit = async () => {
|