@dazhicheng/ui 1.5.202 → 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 +3 -3
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { isObject as v, isArray as E } from "./is.js";
|
|
2
|
+
import "vue";
|
|
3
|
+
import "xe-utils";
|
|
4
|
+
import { twMerge as M } from "../../../node_modules/.pnpm/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js";
|
|
5
|
+
import { clsx as P } from "../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
6
|
+
import { klona as U } from "../../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.js";
|
|
7
|
+
import "dayjs";
|
|
8
|
+
import "dayjs/plugin/utc";
|
|
9
|
+
import "dayjs/plugin/timezone";
|
|
10
|
+
function J(n, i = "12", e = "Microsoft YaHei,Arial,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue','Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji'") {
|
|
11
|
+
let t = 0;
|
|
12
|
+
const o = document.createElement("canvas").getContext("2d");
|
|
13
|
+
return o && (o.font = `${i} ${e}`, t = o.measureText(n).width), t;
|
|
14
|
+
}
|
|
15
|
+
function S(n, i, e) {
|
|
16
|
+
const t = (e == null ? void 0 : e.excludeAll) || [], f = (e == null ? void 0 : e.exclude) || [];
|
|
17
|
+
return t.includes("Id") || t.push("Id"), t.includes("rowId") || t.push("rowId"), Object.fromEntries(
|
|
18
|
+
Object.entries(n).reduce((o, [s, r]) => (t.includes(s) || f.includes(s) || (r && v(r) ? L(e, i, r, s, o) : r && E(r) ? z(e, i, r, s, o) : H(e, i, r, s, o)), o), [])
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function L(n, i, e, t, f) {
|
|
22
|
+
const o = S(e, i[t] || {}, {
|
|
23
|
+
excludeAll: n == null ? void 0 : n.excludeAll,
|
|
24
|
+
...n
|
|
25
|
+
});
|
|
26
|
+
Object.keys(o).length && f.push([t, o]);
|
|
27
|
+
}
|
|
28
|
+
function z(n, i, e, t, f) {
|
|
29
|
+
var r, d, u;
|
|
30
|
+
const o = [], s = (r = (n || {})[t]) == null ? void 0 : r.key;
|
|
31
|
+
if (i[t]) {
|
|
32
|
+
const a = (e == null ? void 0 : e.length) >= ((d = i[t]) == null ? void 0 : d.length) ? e : i[t], g = (e == null ? void 0 : e.length) < ((u = i[t]) == null ? void 0 : u.length) ? e : i[t];
|
|
33
|
+
s ? a.forEach((l) => {
|
|
34
|
+
const p = g.find((h) => h[s] === l[s]);
|
|
35
|
+
if (p) {
|
|
36
|
+
const h = S(l, p, {
|
|
37
|
+
excludeAll: n == null ? void 0 : n.excludeAll,
|
|
38
|
+
...n[t]
|
|
39
|
+
});
|
|
40
|
+
Object.keys(h).length && o.push({ [s]: p[s], ...h });
|
|
41
|
+
} else
|
|
42
|
+
o.push(l);
|
|
43
|
+
}) : a.forEach((l, p) => {
|
|
44
|
+
const h = g[p];
|
|
45
|
+
if (v(l) && !v(h) || E(l) && !E(h) || typeof l != typeof h || !h)
|
|
46
|
+
o.push(l);
|
|
47
|
+
else if (v(l) || E(l)) {
|
|
48
|
+
const A = S(l, h, { excludeAll: n == null ? void 0 : n.excludeAll });
|
|
49
|
+
Object.keys(A).length && o.push({ ...A });
|
|
50
|
+
} else l !== h && o.push(l);
|
|
51
|
+
});
|
|
52
|
+
} else
|
|
53
|
+
o.push(...e);
|
|
54
|
+
o.length && f.push([t, o]);
|
|
55
|
+
}
|
|
56
|
+
function H(n, i, e, t, f) {
|
|
57
|
+
const o = (n == null ? void 0 : n.notNullToFalse) || [];
|
|
58
|
+
if (typeof e == "string" && typeof i[t] == "number" || typeof e == "number" && typeof i[t] == "string")
|
|
59
|
+
Number(e) !== Number(i[t]) && f.push([t, e]);
|
|
60
|
+
else if ([void 0, null, ""].includes(e))
|
|
61
|
+
[void 0, null, ""].includes(i[t]) || f.push([t, e]);
|
|
62
|
+
else if (e !== i[t]) {
|
|
63
|
+
if (e === !1 && [void 0, null, ""].includes(i[t]) && !o.includes(t))
|
|
64
|
+
return;
|
|
65
|
+
f.push([t, e]);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function W(n, i, e) {
|
|
69
|
+
const t = {}, f = ["rowId", "row_id"], o = (e == null ? void 0 : e.excludeAll) || [], s = (e == null ? void 0 : e.exclude) || [];
|
|
70
|
+
for (const r in i)
|
|
71
|
+
if (Object.prototype.hasOwnProperty.call(i, r) && ![...o, ...f].includes(r) && ![...s, ...f].includes(r)) {
|
|
72
|
+
const d = n[r], u = i[r];
|
|
73
|
+
if (Array.isArray(u) && Array.isArray(d))
|
|
74
|
+
(d.length !== u.length || d.some((g, l) => typeof g == "object" && typeof u[l] == "object" ? Object.keys(W(g, u[l], { excludeAll: o, ...e == null ? void 0 : e[r] })).length > 0 : g !== u[l])) && (t[r] = u);
|
|
75
|
+
else if (typeof u == "object" && typeof d == "object" && u !== null && d !== null) {
|
|
76
|
+
const a = W(d, u, { excludeAll: o, ...e == null ? void 0 : e[r] });
|
|
77
|
+
Object.keys(a).length > 0 && (t[r] = a);
|
|
78
|
+
} else d !== u && String(d) !== String(u) && (t[r] = u);
|
|
79
|
+
}
|
|
80
|
+
return t;
|
|
81
|
+
}
|
|
82
|
+
function Q(n) {
|
|
83
|
+
const i = Object.getPrototypeOf(n);
|
|
84
|
+
if (!i || i === Object.prototype)
|
|
85
|
+
return n;
|
|
86
|
+
const e = Object.getOwnPropertyNames(i);
|
|
87
|
+
for (const t of e) {
|
|
88
|
+
const f = n[t];
|
|
89
|
+
t !== "constructor" && typeof f == "function" && (n[t] = f.bind(n));
|
|
90
|
+
}
|
|
91
|
+
return n;
|
|
92
|
+
}
|
|
93
|
+
function X(...n) {
|
|
94
|
+
for (const i of n)
|
|
95
|
+
if (i != null)
|
|
96
|
+
return i;
|
|
97
|
+
}
|
|
98
|
+
function Z(...n) {
|
|
99
|
+
return M(P(n));
|
|
100
|
+
}
|
|
101
|
+
function y() {
|
|
102
|
+
const n = new Event("resize");
|
|
103
|
+
window.dispatchEvent(n);
|
|
104
|
+
}
|
|
105
|
+
function b(n) {
|
|
106
|
+
return U(n);
|
|
107
|
+
}
|
|
108
|
+
function j(n, i = 200, e = {}) {
|
|
109
|
+
const { leading: t = !1, trailing: f = !0, maxWait: o } = e;
|
|
110
|
+
let s, r, d, u = 0, a, g;
|
|
111
|
+
function l(c) {
|
|
112
|
+
const m = a;
|
|
113
|
+
return a = void 0, u = c, g = n(...m), g;
|
|
114
|
+
}
|
|
115
|
+
function p() {
|
|
116
|
+
s !== void 0 && (window.clearTimeout(s), s = void 0), r !== void 0 && (window.clearTimeout(r), r = void 0);
|
|
117
|
+
}
|
|
118
|
+
function h() {
|
|
119
|
+
p(), u = 0, a = void 0, d = void 0, g = void 0;
|
|
120
|
+
}
|
|
121
|
+
function A(c) {
|
|
122
|
+
const m = c - d, x = c - u, N = i - m;
|
|
123
|
+
return o !== void 0 ? Math.min(N, o - x) : N;
|
|
124
|
+
}
|
|
125
|
+
function D(c) {
|
|
126
|
+
if (d === void 0) return !0;
|
|
127
|
+
const m = c - d, x = c - u;
|
|
128
|
+
return m >= i || m < 0 || o !== void 0 && x >= o;
|
|
129
|
+
}
|
|
130
|
+
function C(c) {
|
|
131
|
+
return u = c, p(), s = window.setTimeout(T, i), o !== void 0 && (r = window.setTimeout(I, o)), t ? l(c) : g;
|
|
132
|
+
}
|
|
133
|
+
function F(c) {
|
|
134
|
+
return s = void 0, f && a !== void 0 ? l(c) : (a = void 0, g);
|
|
135
|
+
}
|
|
136
|
+
function T() {
|
|
137
|
+
const c = Date.now();
|
|
138
|
+
if (D(c)) {
|
|
139
|
+
F(c);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
const m = A(c);
|
|
143
|
+
m > 0 ? s = window.setTimeout(T, m) : s = void 0;
|
|
144
|
+
}
|
|
145
|
+
function I() {
|
|
146
|
+
const c = Date.now();
|
|
147
|
+
p(), a !== void 0 && l(c);
|
|
148
|
+
}
|
|
149
|
+
const w = (...c) => {
|
|
150
|
+
const m = Date.now(), x = D(m);
|
|
151
|
+
if (a = c ?? [], d = m, x) {
|
|
152
|
+
if (s === void 0)
|
|
153
|
+
return C(m);
|
|
154
|
+
if (o !== void 0)
|
|
155
|
+
return p(), s = window.setTimeout(T, i), r = window.setTimeout(I, o), t ? l(m) : g;
|
|
156
|
+
}
|
|
157
|
+
return s === void 0 && (s = window.setTimeout(T, i), o !== void 0 && (r = window.setTimeout(I, o))), g;
|
|
158
|
+
};
|
|
159
|
+
return w.isPending = () => s !== void 0 || r !== void 0, w.cancel = () => {
|
|
160
|
+
h();
|
|
161
|
+
}, w.flush = (...c) => {
|
|
162
|
+
if (!w.isPending())
|
|
163
|
+
return c.length > 0 ? n(...c) : g;
|
|
164
|
+
const m = a !== void 0 ? a : c;
|
|
165
|
+
return h(), n(...m);
|
|
166
|
+
}, w;
|
|
167
|
+
}
|
|
168
|
+
export {
|
|
169
|
+
Q as bindMethods,
|
|
170
|
+
J as calcWordsWidth,
|
|
171
|
+
Z as clnm,
|
|
172
|
+
b as cloneDeep,
|
|
173
|
+
W as compareObjects,
|
|
174
|
+
j as debounce,
|
|
175
|
+
S as getDifference,
|
|
176
|
+
X as getFirstNonNullOrUndefined,
|
|
177
|
+
z as setDifferenceArr,
|
|
178
|
+
H as setDifferenceField,
|
|
179
|
+
L as setDifferenceObj,
|
|
180
|
+
y as triggerWindowResize
|
|
181
|
+
};
|
|
@@ -1,58 +1,69 @@
|
|
|
1
|
-
import { h as
|
|
2
|
-
import
|
|
1
|
+
import { h as l, defineComponent as w, shallowRef as b, onMounted as $ } from "vue";
|
|
2
|
+
import "axios";
|
|
3
|
+
import "element-plus";
|
|
4
|
+
import { isFunction as c } from "../../packages/utils/src/is.js";
|
|
5
|
+
import "xe-utils";
|
|
6
|
+
import "dayjs";
|
|
7
|
+
import "dayjs/plugin/utc";
|
|
8
|
+
import "dayjs/plugin/timezone";
|
|
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";
|
|
3
14
|
import { cloneDeep as f } from "lodash-es";
|
|
4
|
-
function
|
|
15
|
+
function Y() {
|
|
5
16
|
return {
|
|
6
|
-
install(
|
|
7
|
-
|
|
8
|
-
renderTableDefault(
|
|
9
|
-
const { row: u, column: n, $table:
|
|
10
|
-
if (
|
|
11
|
-
const t =
|
|
17
|
+
install(C) {
|
|
18
|
+
C.renderer.add("renderCellContent", {
|
|
19
|
+
renderTableDefault(v, F) {
|
|
20
|
+
const { row: u, column: n, $table: r } = F, e = v.props ?? {}, d = `${n.field}Option`;
|
|
21
|
+
if (r[d]) {
|
|
22
|
+
const t = r[d];
|
|
12
23
|
if (c(e.customRender))
|
|
13
|
-
return
|
|
24
|
+
return l(
|
|
14
25
|
e.customRender({
|
|
15
26
|
result: f(t),
|
|
16
27
|
row: u,
|
|
17
28
|
column: n,
|
|
18
|
-
$table:
|
|
29
|
+
$table: r
|
|
19
30
|
})
|
|
20
31
|
);
|
|
21
|
-
const
|
|
22
|
-
return
|
|
32
|
+
const o = t.find((i) => i[e.valueField] === n.field);
|
|
33
|
+
return l("div", null, (o == null ? void 0 : o[e.labelField]) ?? "");
|
|
23
34
|
}
|
|
24
|
-
const
|
|
35
|
+
const h = w({
|
|
25
36
|
name: "RenderCellContent",
|
|
26
37
|
setup() {
|
|
27
|
-
var
|
|
38
|
+
var m;
|
|
28
39
|
const t = b([]);
|
|
29
|
-
async function
|
|
30
|
-
var
|
|
31
|
-
if (
|
|
40
|
+
async function o() {
|
|
41
|
+
var s, p;
|
|
42
|
+
if (r[d]) return;
|
|
32
43
|
let a = {};
|
|
33
|
-
c(e.beforeFetch) && (a = await ((
|
|
34
|
-
const
|
|
35
|
-
t.value =
|
|
44
|
+
c(e.beforeFetch) && (a = await ((s = e.beforeFetch) == null ? void 0 : s.call(e, u, n)));
|
|
45
|
+
const R = await ((p = e.api) == null ? void 0 : p.call(e, a));
|
|
46
|
+
t.value = R, c(e.afterFetch) && (t.value = await e.afterFetch(t.value, u, n)), r[`${n.field}Option`] = f(t.value);
|
|
36
47
|
}
|
|
37
|
-
if ($(
|
|
38
|
-
return () =>
|
|
48
|
+
if ($(o), e.customRender)
|
|
49
|
+
return () => l(
|
|
39
50
|
e.customRender({
|
|
40
51
|
result: f(t.value),
|
|
41
52
|
row: u,
|
|
42
53
|
column: n,
|
|
43
|
-
$table:
|
|
54
|
+
$table: r
|
|
44
55
|
})
|
|
45
56
|
);
|
|
46
|
-
const
|
|
47
|
-
return () =>
|
|
57
|
+
const i = (m = t.value) == null ? void 0 : m.find((a) => a[e.valueField] === n.field);
|
|
58
|
+
return () => l("div", null, (i == null ? void 0 : i[e.labelField]) ?? "");
|
|
48
59
|
}
|
|
49
60
|
});
|
|
50
|
-
return
|
|
61
|
+
return l(h);
|
|
51
62
|
}
|
|
52
63
|
});
|
|
53
64
|
}
|
|
54
65
|
};
|
|
55
66
|
}
|
|
56
67
|
export {
|
|
57
|
-
|
|
68
|
+
Y as createVxePluginRenderCellContent
|
|
58
69
|
};
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { ElSwitch as L, ElMessageBox as x, ElMessage as A } from "element-plus";
|
|
2
2
|
import { omit as U } from "lodash-es";
|
|
3
3
|
import { h as w, defineComponent as _, ref as y } from "vue";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
4
|
+
import "axios";
|
|
5
|
+
import { isFunction as u } from "../../packages/utils/src/is.js";
|
|
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 "../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
|
|
16
|
+
import { kebabToCamelCase as I } from "../../packages/hooks/src/tools.js";
|
|
6
17
|
const D = [
|
|
7
18
|
"modelValue",
|
|
8
19
|
"onUpdate:modelValue",
|
|
@@ -12,23 +23,23 @@ const D = [
|
|
|
12
23
|
"afterFetch",
|
|
13
24
|
"beforeChange"
|
|
14
25
|
];
|
|
15
|
-
function C(
|
|
16
|
-
return Object.fromEntries(Object.entries(
|
|
26
|
+
function C(a) {
|
|
27
|
+
return Object.fromEntries(Object.entries(a).map(([t, l]) => [I(t), l]));
|
|
17
28
|
}
|
|
18
29
|
const M = "1", O = "0";
|
|
19
|
-
function j(
|
|
20
|
-
const t = C(
|
|
30
|
+
function j(a) {
|
|
31
|
+
const t = C(a);
|
|
21
32
|
return {
|
|
22
33
|
active: t.activeValue ?? M,
|
|
23
34
|
inactive: t.inactiveValue ?? O
|
|
24
35
|
};
|
|
25
36
|
}
|
|
26
|
-
function
|
|
37
|
+
function te() {
|
|
27
38
|
return {
|
|
28
|
-
install(
|
|
29
|
-
|
|
39
|
+
install(a) {
|
|
40
|
+
a.renderer.add("switchStatus", {
|
|
30
41
|
renderTableDefault(t, l) {
|
|
31
|
-
const { row:
|
|
42
|
+
const { row: i, column: n } = l, e = t.props ?? {}, v = U(e, [...D]), E = C(v);
|
|
32
43
|
return w(
|
|
33
44
|
_({
|
|
34
45
|
name: "TtVxeSwitchCell",
|
|
@@ -38,17 +49,17 @@ function z() {
|
|
|
38
49
|
activeValue: r,
|
|
39
50
|
inactiveValue: m,
|
|
40
51
|
...E,
|
|
41
|
-
modelValue:
|
|
52
|
+
modelValue: i[n.field],
|
|
42
53
|
loading: s.value,
|
|
43
|
-
"onUpdate:modelValue": (
|
|
44
|
-
|
|
54
|
+
"onUpdate:modelValue": (o) => {
|
|
55
|
+
i[n.field] = o;
|
|
45
56
|
},
|
|
46
57
|
beforeChange: async () => {
|
|
47
|
-
var
|
|
48
|
-
const
|
|
49
|
-
if ((u(e.beforeChange) ? await ((
|
|
50
|
-
const T =
|
|
51
|
-
let
|
|
58
|
+
var d;
|
|
59
|
+
const o = i[n.field];
|
|
60
|
+
if ((u(e.beforeChange) ? await ((d = e.beforeChange) == null ? void 0 : d.call(e, o)) : !0) === !1 || !u(e.api)) return !1;
|
|
61
|
+
const T = o === r ? m : r, b = `是否确认${o === r ? "关闭" : "开启"}`;
|
|
62
|
+
let p = !1;
|
|
52
63
|
return await x({
|
|
53
64
|
title: e.confirmTitle || "温馨提示",
|
|
54
65
|
message: b,
|
|
@@ -56,13 +67,13 @@ function z() {
|
|
|
56
67
|
cancelButtonText: "取消",
|
|
57
68
|
showCancelButton: !0,
|
|
58
69
|
type: "warning",
|
|
59
|
-
beforeClose: async (B, f,
|
|
60
|
-
var
|
|
70
|
+
beforeClose: async (B, f, g) => {
|
|
71
|
+
var h, V;
|
|
61
72
|
if (B === "confirm") {
|
|
62
73
|
f.confirmButtonLoading = !0;
|
|
63
|
-
let c = { [
|
|
74
|
+
let c = { [n.field]: T, id: i.id };
|
|
64
75
|
if (s.value = !0, u(e.beforeFetch)) {
|
|
65
|
-
const S = await ((
|
|
76
|
+
const S = await ((h = e.beforeFetch) == null ? void 0 : h.call(e, c, i, n));
|
|
66
77
|
c = {
|
|
67
78
|
...c,
|
|
68
79
|
...S
|
|
@@ -71,11 +82,11 @@ function z() {
|
|
|
71
82
|
const F = await e.api(c).finally(() => {
|
|
72
83
|
s.value = !1, f.confirmButtonLoading = !1;
|
|
73
84
|
});
|
|
74
|
-
(V = e.afterFetch) == null || V.call(e, F), A.success(
|
|
85
|
+
(V = e.afterFetch) == null || V.call(e, F), A.success(o === r ? "禁用成功" : "启用成功"), f.confirmButtonLoading = !1, g(), p = !0;
|
|
75
86
|
} else
|
|
76
|
-
|
|
87
|
+
g();
|
|
77
88
|
}
|
|
78
|
-
}),
|
|
89
|
+
}), p;
|
|
79
90
|
}
|
|
80
91
|
});
|
|
81
92
|
}
|
|
@@ -87,5 +98,5 @@ function z() {
|
|
|
87
98
|
};
|
|
88
99
|
}
|
|
89
100
|
export {
|
|
90
|
-
|
|
101
|
+
te as createVxePluginSwitchStatus
|
|
91
102
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dazhicheng/ui",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.204",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"vee-validate": "^4.15.1",
|
|
57
57
|
"xe-utils": "^4.0.0",
|
|
58
58
|
"zod": "^4.3.6",
|
|
59
|
-
"@dazhicheng/
|
|
60
|
-
"@dazhicheng/
|
|
59
|
+
"@dazhicheng/utils": "1.3.38",
|
|
60
|
+
"@dazhicheng/hooks": "1.4.41"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@element-plus/icons-vue": "^2.3.2",
|