@dazhicheng/ui 1.5.203 → 1.5.204
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/_virtual/___vite-browser-external.js +6 -0
- package/dist/_virtual/__vite-browser-external.js +4 -0
- package/dist/_virtual/_commonjs-dynamic-modules.js +6 -0
- package/dist/_virtual/_commonjsHelpers.js +24 -0
- package/dist/_virtual/aes.js +4 -0
- package/dist/_virtual/cipher-core.js +4 -0
- package/dist/_virtual/core.js +4 -0
- package/dist/_virtual/enc-base64.js +4 -0
- package/dist/_virtual/enc-utf8.js +4 -0
- package/dist/_virtual/evpkdf.js +4 -0
- package/dist/_virtual/hmac.js +4 -0
- package/dist/_virtual/md5.js +4 -0
- package/dist/_virtual/mode-ecb.js +4 -0
- package/dist/_virtual/pad-pkcs7.js +4 -0
- package/dist/_virtual/sha1.js +4 -0
- package/dist/components/tt-api-component/index.js +17 -4
- package/dist/components/tt-api-component/index.vue2.js +24 -13
- package/dist/components/tt-area/TtArea.vue3.js +24 -13
- package/dist/components/tt-button/index.js +18 -5
- package/dist/components/tt-button/index.vue2.js +27 -16
- package/dist/components/tt-checkbox/index.js +17 -4
- package/dist/components/tt-checkbox/index.vue.js +38 -28
- package/dist/components/tt-drawer/index.js +17 -7
- package/dist/components/tt-drawer/src/RenderDrawer.vue.js +48 -36
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +39 -26
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue2.js +23 -10
- package/dist/components/tt-drawer/src/props.js +22 -9
- package/dist/components/tt-drawer/src/utils/drawer-api.js +42 -33
- package/dist/components/tt-empty/index.js +28 -18
- package/dist/components/tt-form/index.js +22 -14
- package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +23 -14
- package/dist/components/tt-form/src/components/FormActions.vue2.js +42 -32
- package/dist/components/tt-form/src/form/FormDescription.vue.js +19 -10
- package/dist/components/tt-form/src/form/FormItem.vue.js +18 -9
- package/dist/components/tt-form/src/form/FormLabel.vue.js +18 -9
- package/dist/components/tt-form/src/form/RenderContent.vue.js +25 -13
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +62 -55
- package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +36 -28
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +64 -56
- package/dist/components/tt-form/src/form-render/array-register/utils.js +18 -8
- package/dist/components/tt-form/src/form-render/dependencies.js +36 -24
- package/dist/components/tt-form/src/form-render/form.vue2.js +17 -7
- package/dist/components/tt-form/src/form-render/helper.js +29 -16
- package/dist/components/tt-form/src/form-render/rootWrapperClass.js +17 -7
- package/dist/components/tt-form/src/formApi.js +59 -48
- package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +17 -4
- package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +67 -57
- package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +55 -46
- package/dist/components/tt-form/src/group-form/groupFormApi.js +21 -10
- package/dist/components/tt-form/src/hooks/useForwardPriorityValues.js +27 -17
- package/dist/components/tt-form/src/hooks/useSelectCollapse.js +32 -23
- package/dist/components/tt-form/src/index.vue2.js +53 -45
- package/dist/components/tt-form/src/useFormContext.js +74 -62
- package/dist/components/tt-form-item-error-tooltip/index.js +18 -5
- package/dist/components/tt-form-item-error-tooltip/index.vue.js +32 -21
- package/dist/components/tt-icon/index.js +20 -7
- package/dist/components/tt-image/index.js +19 -6
- package/dist/components/tt-image/src/components/ImageViewer.js +27 -17
- package/dist/components/tt-loading/index.js +16 -4
- package/dist/components/tt-loading/src/directive.js +34 -22
- package/dist/components/tt-log/index.js +17 -4
- package/dist/components/tt-log/index.vue.js +21 -8
- package/dist/components/tt-modal/index.js +16 -5
- package/dist/components/tt-modal/src/RenderModal.vue.js +163 -151
- package/dist/components/tt-modal/src/components/ModalFooter.vue2.js +38 -28
- package/dist/components/tt-modal/src/components/ModalHeader.vue2.js +24 -11
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +36 -23
- package/dist/components/tt-modal/src/props.js +22 -9
- package/dist/components/tt-modal/src/utils/modal-api.js +39 -29
- package/dist/components/tt-modal-form/index.vue.js +44 -36
- package/dist/components/tt-nav-anchor/index.js +17 -4
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +69 -57
- package/dist/components/tt-panel-select/index.js +17 -4
- package/dist/components/tt-panel-select/src/hooks/usePanelData.js +51 -40
- package/dist/components/tt-panel-select/src/index.vue.js +35 -24
- package/dist/components/tt-select/index.js +17 -4
- package/dist/components/tt-select/src/Select.vue.js +79 -68
- package/dist/components/tt-select/src/components/SelectTable.vue.js +41 -30
- package/dist/components/tt-select/src/components/Table.vue.js +86 -76
- package/dist/components/tt-select/src/hooks/useDataSource.js +59 -49
- package/dist/components/tt-select/src/hooks/useSelect.js +46 -38
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.js +123 -112
- package/dist/components/tt-table/index.js +19 -12
- package/dist/components/tt-table/src/Table.vue.js +82 -71
- package/dist/components/tt-table/src/TableForm.vue.js +77 -65
- package/dist/components/tt-table/src/components/TableAction.vue.js +49 -39
- package/dist/components/tt-table/src/components/TableButtons.js +73 -60
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +14 -3
- package/dist/components/tt-table/src/components/TableToobalTools.vue.js +36 -25
- package/dist/components/tt-table/src/hooks/useColumns.js +72 -65
- package/dist/components/tt-table/src/hooks/useCustomColumns.js +43 -31
- package/dist/components/tt-table/src/hooks/useDataSource.js +50 -42
- package/dist/components/tt-table/src/hooks/usePagination.js +36 -25
- package/dist/components/tt-table/src/props.js +55 -42
- package/dist/components/tt-table/src/utils/table-api.js +33 -22
- package/dist/components/tt-table/src/utils/table-form-api.js +35 -24
- package/dist/components/tt-text/index.js +17 -4
- package/dist/components/tt-upload/index.js +19 -6
- package/dist/components/tt-upload/src/TtUpload.vue.js +77 -66
- package/dist/directives/disabled-tip/index.js +37 -26
- package/dist/hooks/useFormSchemasLink.js +90 -79
- package/dist/hooks/useScreenshotOss.js +49 -35
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js +64 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.js +545 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.js +508 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.js +81 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js +10 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.js +71 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.js +84 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.js +72 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js +22 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js +11 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.js +50 -0
- package/dist/node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js +1024 -0
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.js +32 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/apply-style.js +11 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-node.js +92 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-pseudos.js +34 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/dataurl.js +52 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-images.js +43 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-resources.js +47 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-webfonts.js +122 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/index.js +30 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/mimes.js +24 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/util.js +106 -0
- package/dist/node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.js +16 -0
- package/dist/node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.js +21 -0
- package/dist/node_modules/.pnpm/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js +2922 -0
- package/dist/node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js +93 -0
- package/dist/packages/hooks/src/propTypes.js +17 -0
- package/dist/packages/hooks/src/tools.js +6 -0
- package/dist/packages/hooks/src/useDebounce.js +32 -0
- package/dist/packages/hooks/src/useDesign.js +12 -0
- package/dist/packages/hooks/src/useElementScreenshot.js +136 -0
- package/dist/packages/hooks/src/useIsScroll.js +12 -0
- package/dist/packages/hooks/src/usePriorityValue.js +45 -0
- package/dist/packages/utils/src/calc.js +14 -0
- package/dist/packages/utils/src/check.js +10 -0
- package/dist/packages/utils/src/install.js +11 -0
- package/dist/packages/utils/src/is.js +64 -0
- package/dist/packages/utils/src/merge.js +13 -0
- package/dist/packages/utils/src/stateHandler.js +33 -0
- package/dist/packages/utils/src/string.js +6 -0
- package/dist/packages/utils/src/testid-helper.js +14 -0
- package/dist/packages/utils/src/tool.js +181 -0
- package/dist/plugins/default/renderCellContent.js +39 -28
- package/dist/plugins/vxeTable/switchStatus.js +37 -26
- package/package.json +1 -1
|
@@ -1,53 +1,65 @@
|
|
|
1
1
|
import { GlobalConfig as f } from "../../../../hooks/useSetup.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import "axios";
|
|
3
|
+
import "element-plus";
|
|
4
|
+
import { isFunction as d } from "../../../../packages/utils/src/is.js";
|
|
5
|
+
import { ref as j, toValue as p, unref as S } from "vue";
|
|
6
|
+
import "xe-utils";
|
|
7
|
+
import "dayjs";
|
|
8
|
+
import "dayjs/plugin/utc";
|
|
9
|
+
import "dayjs/plugin/timezone";
|
|
10
|
+
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
11
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
12
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
13
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
14
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
15
|
+
import "lodash-es";
|
|
16
|
+
function W({
|
|
17
|
+
getTableProps: c,
|
|
6
18
|
tableMethods: v,
|
|
7
19
|
getProps: I
|
|
8
20
|
}) {
|
|
9
|
-
const
|
|
21
|
+
const u = j(), w = (e) => d(e) ? e() : e ?? "";
|
|
10
22
|
return {
|
|
11
23
|
initCustomSetting: async () => {
|
|
12
|
-
var y, A, K,
|
|
13
|
-
const
|
|
14
|
-
if (!((K = (A =
|
|
24
|
+
var y, A, K, m, O, h;
|
|
25
|
+
const e = v.getTableColumns(), { columns: o, columnsKey: i, defaultDisplayFields: n } = S(c), r = w(i), t = (y = p(o)) != null && y.length ? p(o) : e;
|
|
26
|
+
if (!((K = (A = p(I)) == null ? void 0 : A.table) != null && K.useHttpCache) || !r || !f.userId)
|
|
15
27
|
return;
|
|
16
|
-
const
|
|
17
|
-
permissionOnlyCode:
|
|
28
|
+
const s = (h = (await ((O = (m = c.value) == null ? void 0 : m.getColumnsApi) == null ? void 0 : O.call(m, {
|
|
29
|
+
permissionOnlyCode: r,
|
|
18
30
|
userId: f.userId
|
|
19
31
|
}))).records) == null ? void 0 : h[0];
|
|
20
|
-
let
|
|
21
|
-
if (!(
|
|
22
|
-
|
|
32
|
+
let C = [];
|
|
33
|
+
if (!(s != null && s.json))
|
|
34
|
+
C = n != null && n.length ? t == null ? void 0 : t.filter((a) => n.includes(a.field)) : t;
|
|
23
35
|
else {
|
|
24
|
-
const a = JSON.parse(
|
|
25
|
-
|
|
36
|
+
const a = JSON.parse(s == null ? void 0 : s.json), g = new Map((t == null ? void 0 : t.map((l) => [l.field, l])) ?? []);
|
|
37
|
+
C = a.map((l) => g.get(l)).filter(Boolean);
|
|
26
38
|
}
|
|
27
|
-
|
|
39
|
+
u.value = s == null ? void 0 : s.id, v.setTableColumns(C);
|
|
28
40
|
},
|
|
29
|
-
saveColumns: async (
|
|
30
|
-
var
|
|
31
|
-
const
|
|
41
|
+
saveColumns: async (e) => {
|
|
42
|
+
var n, r;
|
|
43
|
+
const o = (n = p(I)) == null ? void 0 : n.table, i = {
|
|
32
44
|
userId: f.userId,
|
|
33
|
-
permissionOnlyCode: w((
|
|
45
|
+
permissionOnlyCode: w((r = S(c)) == null ? void 0 : r.columnsKey)
|
|
34
46
|
};
|
|
35
|
-
if (
|
|
36
|
-
return await
|
|
37
|
-
id:
|
|
38
|
-
json:
|
|
39
|
-
...
|
|
47
|
+
if (u.value && d(o == null ? void 0 : o.updateColumnsApi))
|
|
48
|
+
return await o.updateColumnsApi({
|
|
49
|
+
id: u.value,
|
|
50
|
+
json: e,
|
|
51
|
+
...i
|
|
40
52
|
});
|
|
41
|
-
if (d(
|
|
42
|
-
const
|
|
43
|
-
...
|
|
44
|
-
json:
|
|
53
|
+
if (d(o == null ? void 0 : o.setColumnsApi)) {
|
|
54
|
+
const t = await o.setColumnsApi({
|
|
55
|
+
...i,
|
|
56
|
+
json: e
|
|
45
57
|
});
|
|
46
|
-
return
|
|
58
|
+
return u.value = t, t;
|
|
47
59
|
}
|
|
48
60
|
}
|
|
49
61
|
};
|
|
50
62
|
}
|
|
51
63
|
export {
|
|
52
|
-
|
|
64
|
+
W as useCustomColumns
|
|
53
65
|
};
|
|
@@ -1,24 +1,32 @@
|
|
|
1
1
|
import { GlobalConfig as E } from "../../../../hooks/useSetup.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { shallowRef as M, ref as
|
|
6
|
-
|
|
2
|
+
import "axios";
|
|
3
|
+
import "element-plus";
|
|
4
|
+
import { isFunction as I } from "../../../../packages/utils/src/is.js";
|
|
5
|
+
import { shallowRef as M, ref as $, computed as j, unref as e, onMounted as ie, watch as y, toValue as oe } from "vue";
|
|
6
|
+
import { compareObjects as L } from "../../../../packages/utils/src/tool.js";
|
|
7
|
+
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
8
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
9
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
10
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
11
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
12
|
+
import { cloneDeep as A, set as p, get as O, isUndefined as ue } from "lodash-es";
|
|
13
|
+
import { useDebounceFn as fe, useTimeoutFn as ge } from "@vueuse/core";
|
|
14
|
+
function Ae(r, {
|
|
7
15
|
xGrid: c,
|
|
8
16
|
setLoading: N,
|
|
9
17
|
paginationRef: F,
|
|
10
|
-
tableData:
|
|
18
|
+
tableData: x,
|
|
11
19
|
getPaginationInfo: V,
|
|
12
|
-
setPagination:
|
|
20
|
+
setPagination: R,
|
|
13
21
|
clearSelectedRowKeys: G,
|
|
14
22
|
getIsTableEvent: ee
|
|
15
23
|
}, S) {
|
|
16
|
-
const h = M([]), B =
|
|
24
|
+
const h = M([]), B = $({}), w = $({}), z = M(!0), U = M(!1), _ = j(() => {
|
|
17
25
|
const { showPager: t, isScrollFetch: a } = e(r);
|
|
18
26
|
return t || a;
|
|
19
27
|
});
|
|
20
28
|
function te(t, a, l) {
|
|
21
|
-
const n = Array.isArray(t), i = n ? t :
|
|
29
|
+
const n = Array.isArray(t), i = n ? t : O(t, "code"), s = n ? t : O(t, a), o = n ? 0 : O(t, l);
|
|
22
30
|
return {
|
|
23
31
|
resultCode: i,
|
|
24
32
|
resultData: s,
|
|
@@ -30,9 +38,9 @@ function Pe(r, {
|
|
|
30
38
|
}
|
|
31
39
|
async function le(t = ((n) => (n = E.table) == null ? void 0 : n.afterFetch)(), a, l) {
|
|
32
40
|
const { isScrollFetch: i, currentPageField: s = "" } = e(r);
|
|
33
|
-
return t && I(t) && (a = await t(a, e(B)) || a), i &&
|
|
41
|
+
return t && I(t) && (a = await t(a, e(B)) || a), i && O(l, s, 1) !== 1 && (a = [...e(h), ...a]), a;
|
|
34
42
|
}
|
|
35
|
-
async function
|
|
43
|
+
async function d(t) {
|
|
36
44
|
var W, X;
|
|
37
45
|
const {
|
|
38
46
|
api: a,
|
|
@@ -52,12 +60,12 @@ function Pe(r, {
|
|
|
52
60
|
const Q = e(r).formApi;
|
|
53
61
|
Q && T && (K = await Q.getValues());
|
|
54
62
|
const D = {};
|
|
55
|
-
|
|
63
|
+
p(D, u, b || 1), p(D, g, f.pageSize);
|
|
56
64
|
try {
|
|
57
65
|
N(!0);
|
|
58
|
-
let
|
|
66
|
+
let m = null;
|
|
59
67
|
if (t != null && t.serverFilterParams && l)
|
|
60
|
-
|
|
68
|
+
m = await l({
|
|
61
69
|
...t == null ? void 0 : t.serverFilterParams,
|
|
62
70
|
...e(_) ? D : {}
|
|
63
71
|
});
|
|
@@ -69,10 +77,10 @@ function Pe(r, {
|
|
|
69
77
|
...t == null ? void 0 : t.searchInfo,
|
|
70
78
|
...e(_) ? D : {}
|
|
71
79
|
};
|
|
72
|
-
k = await ae(s, k),
|
|
80
|
+
k = await ae(s, k), m = await a(k);
|
|
73
81
|
}
|
|
74
|
-
B.value =
|
|
75
|
-
const { resultData: ce, resultTotal: Y } = te(
|
|
82
|
+
B.value = m;
|
|
83
|
+
const { resultData: ce, resultTotal: Y } = te(m, i, v);
|
|
76
84
|
let P = ce || [];
|
|
77
85
|
P = await le(o, P, D), C(P);
|
|
78
86
|
const Z = Y || P.length || 0, se = Math.max(1, Math.ceil(Z / f.pageSize));
|
|
@@ -81,16 +89,16 @@ function Pe(r, {
|
|
|
81
89
|
currentPage: b,
|
|
82
90
|
pageSize: f.pageSize
|
|
83
91
|
}
|
|
84
|
-
})),
|
|
92
|
+
})), R({
|
|
85
93
|
total: Z,
|
|
86
94
|
currentPage: b
|
|
87
|
-
}), w.value =
|
|
95
|
+
}), w.value = A(e(V)), S("fetch-success", {
|
|
88
96
|
items: P,
|
|
89
97
|
total: Y,
|
|
90
|
-
rawDataSource:
|
|
98
|
+
rawDataSource: m
|
|
91
99
|
}), G(), U.value = !0;
|
|
92
|
-
} catch (
|
|
93
|
-
S("fetch-error",
|
|
100
|
+
} catch (m) {
|
|
101
|
+
S("fetch-error", m), C([]);
|
|
94
102
|
} finally {
|
|
95
103
|
setTimeout(() => {
|
|
96
104
|
N(!1);
|
|
@@ -102,10 +110,10 @@ function Pe(r, {
|
|
|
102
110
|
const a = {
|
|
103
111
|
...e(F)
|
|
104
112
|
};
|
|
105
|
-
(l = E.table) != null && l.isReloadResetToFirstPage && (a.currentPage = 1), t ? await
|
|
113
|
+
(l = E.table) != null && l.isReloadResetToFirstPage && (a.currentPage = 1), t ? await d({
|
|
106
114
|
tablePage: Object.hasOwn(t, "tablePage") ? t.tablePage : a,
|
|
107
115
|
searchInfo: Object.hasOwn(t, "searchInfo") ? t.searchInfo : t
|
|
108
|
-
}) : await
|
|
116
|
+
}) : await d({
|
|
109
117
|
tablePage: a
|
|
110
118
|
}), e(r).immediate || (z.value = !1);
|
|
111
119
|
}
|
|
@@ -125,7 +133,7 @@ function Pe(r, {
|
|
|
125
133
|
fieldName: f.field,
|
|
126
134
|
isAscending: f.order === "asc"
|
|
127
135
|
}));
|
|
128
|
-
await
|
|
136
|
+
await d({
|
|
129
137
|
serverFilterParams: {
|
|
130
138
|
filterConditions: s,
|
|
131
139
|
sortConditions: o
|
|
@@ -141,7 +149,7 @@ function Pe(r, {
|
|
|
141
149
|
function re(t) {
|
|
142
150
|
h.value = t, S("update:modelValue", t);
|
|
143
151
|
}
|
|
144
|
-
const C =
|
|
152
|
+
const C = fe((t) => {
|
|
145
153
|
var n, i, s, o, u;
|
|
146
154
|
const a = e(c).getTreeExpandRecords(), l = (i = (n = e(r)) == null ? void 0 : n.treeConfig) == null ? void 0 : i.reserve;
|
|
147
155
|
e(c) && ((s = e(c)) == null || s.loadData(t)), e(r).mergeCells && e(c) && ((o = e(c)) == null || o.setMergeCells(e(r).mergeCells)), e(r).clearTreeExpand ? e(c) && ((u = e(c)) == null || u.clearTreeExpand()) : a.length > 0 && l && e(c).setTreeExpand(a, !0), re(t), S("load-data");
|
|
@@ -149,14 +157,14 @@ function Pe(r, {
|
|
|
149
157
|
function J(t, a) {
|
|
150
158
|
return (t.currentPage || 1) !== a.currentPage || t.pageSize !== a.pageSize;
|
|
151
159
|
}
|
|
152
|
-
return
|
|
153
|
-
w.value =
|
|
160
|
+
return ie(() => {
|
|
161
|
+
w.value = A(e(V)), ge(() => {
|
|
154
162
|
const t = J(e(r).pagerConfig, e(w));
|
|
155
|
-
e(r).immediate && !t &&
|
|
163
|
+
e(r).immediate && !t && d({
|
|
156
164
|
tablePage: e(V)
|
|
157
165
|
});
|
|
158
166
|
}, 16);
|
|
159
|
-
}),
|
|
167
|
+
}), y(
|
|
160
168
|
() => e(F),
|
|
161
169
|
(t) => {
|
|
162
170
|
var l, n, i, s;
|
|
@@ -166,21 +174,21 @@ function Pe(r, {
|
|
|
166
174
|
return;
|
|
167
175
|
}
|
|
168
176
|
const o = !!((n = (l = e(r)) == null ? void 0 : l.filterConfig) != null && n.remote), u = ((i = e(c)) == null ? void 0 : i.getSortColumns()) || [], g = ((s = e(c)) == null ? void 0 : s.getCheckedFilters()) || [];
|
|
169
|
-
o && (u.length > 0 || g.length > 0) ? H("page") :
|
|
177
|
+
o && (u.length > 0 || g.length > 0) ? H("page") : d({
|
|
170
178
|
tablePage: e(F)
|
|
171
179
|
});
|
|
172
180
|
}
|
|
173
181
|
},
|
|
174
182
|
{ deep: !0 }
|
|
175
|
-
),
|
|
176
|
-
j(() =>
|
|
183
|
+
), y(
|
|
184
|
+
j(() => oe(e(r).data) || []),
|
|
177
185
|
(t) => {
|
|
178
186
|
var n;
|
|
179
187
|
const { fullData: a } = e(c) ? ((n = e(c)) == null ? void 0 : n.getTableData()) || {} : { fullData: [] };
|
|
180
|
-
if (Object.keys(
|
|
188
|
+
if (Object.keys(L({ data: t }, { data: a })).length) {
|
|
181
189
|
const { data: i, api: s, modelValue: o } = e(r);
|
|
182
190
|
if ((o ? o.length : 0) === 0 && !s && i) {
|
|
183
|
-
const g = e(r).isDataCloneDeep ?
|
|
191
|
+
const g = e(r).isDataCloneDeep ? A(e(i)) : e(i);
|
|
184
192
|
C(g);
|
|
185
193
|
}
|
|
186
194
|
}
|
|
@@ -189,30 +197,30 @@ function Pe(r, {
|
|
|
189
197
|
immediate: !0,
|
|
190
198
|
deep: !0
|
|
191
199
|
}
|
|
192
|
-
),
|
|
200
|
+
), y(
|
|
193
201
|
j(() => e(r).modelValue || []),
|
|
194
202
|
(t) => {
|
|
195
203
|
var n;
|
|
196
204
|
if (e(ee)) return;
|
|
197
205
|
const { fullData: a } = e(c) ? ((n = e(c)) == null ? void 0 : n.getTableData()) || {} : { fullData: [] };
|
|
198
|
-
if (Object.keys(
|
|
206
|
+
if (Object.keys(L({ data: t }, { data: a })).length) {
|
|
199
207
|
const { api: i, modelValue: s } = e(r);
|
|
200
208
|
if (!i && s) {
|
|
201
|
-
const o = e(r).isDataCloneDeep ?
|
|
209
|
+
const o = e(r).isDataCloneDeep ? A(s) : e(s);
|
|
202
210
|
C(o);
|
|
203
211
|
}
|
|
204
212
|
}
|
|
205
213
|
},
|
|
206
214
|
{ immediate: !0, deep: !0 }
|
|
207
|
-
),
|
|
215
|
+
), y(
|
|
208
216
|
() => h.value,
|
|
209
217
|
() => {
|
|
210
|
-
|
|
218
|
+
x.value = e(h);
|
|
211
219
|
},
|
|
212
220
|
{ deep: !0, immediate: !0 }
|
|
213
221
|
), {
|
|
214
222
|
dataSource: h,
|
|
215
|
-
fetch:
|
|
223
|
+
fetch: d,
|
|
216
224
|
reload: q,
|
|
217
225
|
reloadFilter: H,
|
|
218
226
|
getDataSource: ne,
|
|
@@ -220,5 +228,5 @@ function Pe(r, {
|
|
|
220
228
|
};
|
|
221
229
|
}
|
|
222
230
|
export {
|
|
223
|
-
|
|
231
|
+
Ae as useDataSource
|
|
224
232
|
};
|
|
@@ -1,14 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { ref as
|
|
5
|
-
|
|
1
|
+
import "axios";
|
|
2
|
+
import "element-plus";
|
|
3
|
+
import "dayjs";
|
|
4
|
+
import { ref as f, unref as e, computed as c, watch as l } from "vue";
|
|
5
|
+
import "xe-utils";
|
|
6
|
+
import "dayjs/plugin/utc";
|
|
7
|
+
import "dayjs/plugin/timezone";
|
|
8
|
+
import { mergeWithArrayOverride as s } from "../../../../packages/utils/src/merge.js";
|
|
9
|
+
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
10
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
11
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
12
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
13
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
14
|
+
import { isEqual as P } from "lodash-es";
|
|
15
|
+
import { GlobalConfig as h } from "../../../../hooks/useSetup.js";
|
|
16
|
+
function G(i, p) {
|
|
6
17
|
var g;
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
),
|
|
10
|
-
const { showPager:
|
|
11
|
-
if (!(!
|
|
18
|
+
const o = f(
|
|
19
|
+
s(e(i).pagerConfig || {}, ((g = h.table) == null ? void 0 : g.pagerConfig) || {})
|
|
20
|
+
), n = c(() => {
|
|
21
|
+
const { showPager: t, pagerConfig: r } = e(i);
|
|
22
|
+
if (!(!t && !r))
|
|
12
23
|
return {
|
|
13
24
|
currentPage: 1,
|
|
14
25
|
pageSize: 300,
|
|
@@ -16,29 +27,29 @@ function S(o, u) {
|
|
|
16
27
|
pageSizes: [300, 500, 1e3, 2e3],
|
|
17
28
|
layouts: ["Total", "PrevPage", "JumpNumber", "NextPage", "Sizes", "FullJump"],
|
|
18
29
|
// ...unref(refProps).pagerConfig,
|
|
19
|
-
...
|
|
30
|
+
...e(o)
|
|
20
31
|
};
|
|
21
32
|
});
|
|
22
|
-
function
|
|
23
|
-
return n
|
|
33
|
+
function m() {
|
|
34
|
+
return e(n);
|
|
24
35
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
27
|
-
...
|
|
28
|
-
...
|
|
36
|
+
function a(t) {
|
|
37
|
+
o.value = {
|
|
38
|
+
...e(o),
|
|
39
|
+
...t
|
|
29
40
|
};
|
|
30
41
|
}
|
|
31
|
-
function
|
|
32
|
-
|
|
42
|
+
function u(t) {
|
|
43
|
+
p("page-change", t);
|
|
33
44
|
}
|
|
34
|
-
return
|
|
35
|
-
() =>
|
|
36
|
-
(
|
|
37
|
-
|
|
45
|
+
return l(
|
|
46
|
+
() => e(i).pagerConfig,
|
|
47
|
+
(t, r) => {
|
|
48
|
+
t && !P(t, r) && a(t);
|
|
38
49
|
},
|
|
39
50
|
{ deep: !0 }
|
|
40
|
-
), { configRef:
|
|
51
|
+
), { configRef: o, getPagination: m, getPaginationInfo: n, setPagination: a, handlePageChange: u };
|
|
41
52
|
}
|
|
42
53
|
export {
|
|
43
|
-
|
|
54
|
+
G as usePagination
|
|
44
55
|
};
|