@funcho/ui 1.1.3 → 1.1.4
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/dist/cjs/business/DataTable/DataTable.vue.js +8 -2
- package/dist/cjs/packages/ui/package.json.js +1 -1
- package/dist/esm/business/DataTable/DataTable.vue.mjs +8 -2
- package/dist/esm/packages/ui/package.json.mjs +1 -1
- package/dist/types/business/DataTable/DataTable.vue.d.ts +4 -1
- package/dist/types/business/DataTable/index.d.ts +12 -3
- package/package.json +1 -1
|
@@ -99,7 +99,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
99
99
|
actions: { default: () => [] },
|
|
100
100
|
tools: { default: () => [] }
|
|
101
101
|
},
|
|
102
|
-
setup(__props) {
|
|
102
|
+
setup(__props, { expose: __expose }) {
|
|
103
103
|
const ns = useNamespace.useNamespace("data-table");
|
|
104
104
|
const formRef = vue.ref();
|
|
105
105
|
const { height: formHeight } = core.useElementSize(formRef);
|
|
@@ -158,7 +158,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
158
158
|
const params = formRef.value?.model || {};
|
|
159
159
|
try {
|
|
160
160
|
tableLoading.value = true;
|
|
161
|
-
const { data } = await props.request(
|
|
161
|
+
const { data } = await props.request(
|
|
162
|
+
props.isPagination ? { ...params, page: pagination.value.currentPage, size: pagination.value.pageSize } : params
|
|
163
|
+
);
|
|
162
164
|
tableData.value = Array.isArray(data) ? data : data.list || [];
|
|
163
165
|
pagination.value.total = Array.isArray(data) ? data.length : data.total || 0;
|
|
164
166
|
} catch (error) {
|
|
@@ -185,6 +187,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
185
187
|
pagination.value.pageSize = pageSize;
|
|
186
188
|
loadData();
|
|
187
189
|
};
|
|
190
|
+
__expose({
|
|
191
|
+
loadData,
|
|
192
|
+
tableData
|
|
193
|
+
});
|
|
188
194
|
return (_ctx, _cache) => {
|
|
189
195
|
const _directive_loading = vue.resolveDirective("loading");
|
|
190
196
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -95,7 +95,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
95
95
|
actions: { default: () => [] },
|
|
96
96
|
tools: { default: () => [] }
|
|
97
97
|
},
|
|
98
|
-
setup(__props) {
|
|
98
|
+
setup(__props, { expose: __expose }) {
|
|
99
99
|
const ns = useNamespace("data-table");
|
|
100
100
|
const formRef = ref();
|
|
101
101
|
const { height: formHeight } = useElementSize(formRef);
|
|
@@ -154,7 +154,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
154
154
|
const params = formRef.value?.model || {};
|
|
155
155
|
try {
|
|
156
156
|
tableLoading.value = true;
|
|
157
|
-
const { data } = await props.request(
|
|
157
|
+
const { data } = await props.request(
|
|
158
|
+
props.isPagination ? { ...params, page: pagination.value.currentPage, size: pagination.value.pageSize } : params
|
|
159
|
+
);
|
|
158
160
|
tableData.value = Array.isArray(data) ? data : data.list || [];
|
|
159
161
|
pagination.value.total = Array.isArray(data) ? data.length : data.total || 0;
|
|
160
162
|
} catch (error) {
|
|
@@ -181,6 +183,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
181
183
|
pagination.value.pageSize = pageSize;
|
|
182
184
|
loadData();
|
|
183
185
|
};
|
|
186
|
+
__expose({
|
|
187
|
+
loadData,
|
|
188
|
+
tableData
|
|
189
|
+
});
|
|
184
190
|
return (_ctx, _cache) => {
|
|
185
191
|
const _directive_loading = resolveDirective("loading");
|
|
186
192
|
return openBlock(), createElementBlock("div", {
|
|
@@ -29,7 +29,10 @@ type __VLS_Props = {
|
|
|
29
29
|
hidden?: boolean | (() => boolean);
|
|
30
30
|
}>;
|
|
31
31
|
};
|
|
32
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
32
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
33
|
+
loadData: () => Promise<void>;
|
|
34
|
+
tableData: import('vue').Ref<any[], any[]>;
|
|
35
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
33
36
|
height: number;
|
|
34
37
|
fields: Array<TProFormField>;
|
|
35
38
|
tools: Array<{
|
|
@@ -25,7 +25,10 @@ export declare const FcProDataTable: {
|
|
|
25
25
|
disabled?: boolean | (() => boolean);
|
|
26
26
|
hidden?: boolean | (() => boolean);
|
|
27
27
|
}>;
|
|
28
|
-
}> & Readonly<{}>, {
|
|
28
|
+
}> & Readonly<{}>, {
|
|
29
|
+
loadData: () => Promise<void>;
|
|
30
|
+
tableData: import('vue').Ref<any[], any[]>;
|
|
31
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
29
32
|
height: number;
|
|
30
33
|
fields: Array<import('..').TProFormField>;
|
|
31
34
|
tools: Array<{
|
|
@@ -1826,7 +1829,10 @@ export declare const FcProDataTable: {
|
|
|
1826
1829
|
disabled?: boolean | (() => boolean);
|
|
1827
1830
|
hidden?: boolean | (() => boolean);
|
|
1828
1831
|
}>;
|
|
1829
|
-
}> & Readonly<{}>, {
|
|
1832
|
+
}> & Readonly<{}>, {
|
|
1833
|
+
loadData: () => Promise<void>;
|
|
1834
|
+
tableData: import('vue').Ref<any[], any[]>;
|
|
1835
|
+
}, {}, {}, {}, {
|
|
1830
1836
|
height: number;
|
|
1831
1837
|
fields: Array<import('..').TProFormField>;
|
|
1832
1838
|
tools: Array<{
|
|
@@ -1882,7 +1888,10 @@ export declare const FcProDataTable: {
|
|
|
1882
1888
|
disabled?: boolean | (() => boolean);
|
|
1883
1889
|
hidden?: boolean | (() => boolean);
|
|
1884
1890
|
}>;
|
|
1885
|
-
}> & Readonly<{}>, {
|
|
1891
|
+
}> & Readonly<{}>, {
|
|
1892
|
+
loadData: () => Promise<void>;
|
|
1893
|
+
tableData: import('vue').Ref<any[], any[]>;
|
|
1894
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
1886
1895
|
height: number;
|
|
1887
1896
|
fields: Array<import('..').TProFormField>;
|
|
1888
1897
|
tools: Array<{
|