cosey 0.2.8 → 0.2.9
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, resolveComponent, resolveDirective, withDirectives, createElementBlock, openBlock, normalizeStyle, normalizeClass, createCommentVNode, createElementVNode, createVNode, createBlock, renderSlot, withCtx, createSlots, Fragment, renderList, normalizeProps, guardReactiveProps } from 'vue';
|
|
1
|
+
import { defineComponent, useSlots, unref, computed, ref, useTemplateRef, mergeProps, watch, onMounted, resolveComponent, resolveDirective, withDirectives, createElementBlock, openBlock, normalizeStyle, normalizeClass, createCommentVNode, createElementVNode, createVNode, createBlock, renderSlot, withCtx, createSlots, Fragment, renderList, normalizeProps, guardReactiveProps } from 'vue';
|
|
2
2
|
import { merge, cloneDeep, get } from 'lodash-es';
|
|
3
3
|
import { reactiveComputed, reactiveOmit } from '@vueuse/core';
|
|
4
4
|
import { useZIndex, ElButton } from 'element-plus';
|
|
@@ -119,7 +119,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
119
119
|
params = props.beforeFetch?.(params) || params;
|
|
120
120
|
return props.api?.(params);
|
|
121
121
|
}, {
|
|
122
|
-
immediate:
|
|
122
|
+
immediate: false,
|
|
123
123
|
onSuccess(res) {
|
|
124
124
|
res = props.afterFetch?.(res) || res;
|
|
125
125
|
tableData.value = (tableKeys.list ? get(res, tableKeys.list) : res) || [];
|
|
@@ -130,6 +130,11 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
130
130
|
reloading.value = false;
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
|
+
onMounted(() => {
|
|
134
|
+
if (props.immediate) {
|
|
135
|
+
execute();
|
|
136
|
+
}
|
|
137
|
+
});
|
|
133
138
|
const total = ref(0);
|
|
134
139
|
const page = ref(1);
|
|
135
140
|
const pageSize = ref(10);
|