@dazhicheng/ui 1.5.261 → 1.5.263
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/components/tt-api-component/index.vue2.js +41 -40
- package/dist/components/tt-button/index.vue2.js +10 -9
- package/dist/components/tt-drawer/src/RenderDrawer.vue.js +16 -15
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +3 -2
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue2.js +3 -2
- package/dist/components/tt-drawer/src/props.js +3 -2
- package/dist/components/tt-form/index.js +7 -6
- package/dist/components/tt-form/src/components/FormActions.vue2.js +3 -2
- package/dist/components/tt-form/src/form-render/form.vue2.js +3 -2
- package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +3 -2
- package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +26 -25
- package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +3 -2
- package/dist/components/tt-form/src/hooks/useSelectCollapse.js +82 -64
- package/dist/components/tt-form/src/index.vue2.js +3 -2
- package/dist/components/tt-log/index.vue.js +5 -4
- package/dist/components/tt-modal/src/RenderModal.vue.js +3 -2
- package/dist/components/tt-modal/src/components/ModalHeader.vue2.js +7 -6
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +3 -2
- package/dist/components/tt-modal/src/props.js +3 -2
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +3 -2
- package/dist/components/tt-panel-select/src/components/PanelLeft.vue.js +29 -23
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.js +89 -81
- package/dist/components/tt-panel-select/src/components/PanelRight.vue.js +49 -43
- package/dist/components/tt-panel-select/src/hooks/usePanelData.js +56 -49
- package/dist/components/tt-panel-select/src/hooks/usePanelSelection.d.ts +3 -0
- package/dist/components/tt-panel-select/src/hooks/usePanelSelection.js +94 -61
- package/dist/components/tt-panel-select/src/index.vue.d.ts +1 -1
- package/dist/components/tt-panel-select/src/index.vue.js +205 -190
- package/dist/components/tt-radio-group/index.vue.js +11 -10
- package/dist/components/tt-select/src/Select.vue.js +3 -2
- package/dist/components/tt-select/src/components/SelectTable.vue.js +3 -2
- package/dist/components/tt-select/src/components/Table.vue.js +3 -2
- package/dist/components/tt-table/index.js +1 -1
- package/dist/components/tt-table/src/Table.vue.js +45 -44
- package/dist/components/tt-table/src/TableForm.vue.js +1 -1
- package/dist/components/tt-table/src/components/TableAction.vue.js +12 -11
- package/dist/components/tt-table/src/components/TableButtons.js +3 -2
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +34 -33
- package/dist/components/tt-table/src/props.js +5 -4
- package/dist/components/tt-upload/src/TtUpload.vue.js +15 -14
- package/dist/hooks/basicDataCodes.d.ts +4 -1
- package/dist/hooks/basicDataCodes.js +35 -33
- package/dist/hooks/usePanelSelectSchemas.d.ts +3 -2
- package/dist/hooks/usePanelSelectSchemas.js +62 -62
- package/dist/hooks/useScreenshotOss.js +3 -2
- package/dist/plugins/vxeTable/switchStatus.js +3 -2
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "axios";
|
|
2
2
|
import "element-plus";
|
|
3
|
-
import { isFunction as
|
|
3
|
+
import { isFunction as f } from "../packages/utils/src/is.js";
|
|
4
4
|
import "vue";
|
|
5
5
|
import "xe-utils";
|
|
6
6
|
import "dayjs";
|
|
@@ -12,38 +12,38 @@ import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js
|
|
|
12
12
|
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
13
13
|
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
14
14
|
import { omit as _ } from "lodash-es";
|
|
15
|
-
import { CODE_REGISTRY as
|
|
16
|
-
import { useBasicDataOptions as
|
|
17
|
-
const
|
|
15
|
+
import { CODE_REGISTRY as ce, resolveDefaultGroupBy as le, GROUP_BY as V, groupBasicDataOptions as j } from "./basicDataCodes.js";
|
|
16
|
+
import { useBasicDataOptions as pe } from "./useBasicDataOptions.js";
|
|
17
|
+
const b = "all";
|
|
18
18
|
function d(t) {
|
|
19
19
|
return Array.isArray(t) ? t : t == null || t === "" ? [] : [t];
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function ue(t, n = b) {
|
|
22
22
|
return t === n ? !0 : typeof t == "string" && typeof n == "string" && t.toLowerCase() === String(n).toLowerCase();
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
return d(t).some((r) =>
|
|
24
|
+
function ie(t, n = b) {
|
|
25
|
+
return d(t).some((r) => ue(r, n));
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function ae(t) {
|
|
28
28
|
return t.replace(/[-_]+/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").split(/\s+/).filter(Boolean).map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join("");
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function q(t, n) {
|
|
31
31
|
const r = "支持多选和全选", s = typeof t == "string" && t.trim() ? t.trim().replace(/[,,]\s*$/, "") : "请选择";
|
|
32
32
|
return s.includes(r) ? s : `${s},${r}`;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return t ?
|
|
34
|
+
function Z(t, n, r, s) {
|
|
35
|
+
return t ? f(t) ? t(n, r, s) : t : {};
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function H(t, n, r, s) {
|
|
38
38
|
const p = new Set(r.map((e) => e.value)), l = t[n];
|
|
39
39
|
if (s) {
|
|
40
40
|
const e = d(l).filter((u) => p.has(u)), c = d(l);
|
|
41
|
-
(e.length !== c.length || e.some((u,
|
|
41
|
+
(e.length !== c.length || e.some((u, O) => u !== c[O])) && (t[n] = e);
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
l == null || l === "" || p.has(l) || (t[n] = void 0);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function J(t, n, r, s, p, l) {
|
|
47
47
|
const e = l ? p.filter((c) => d(r[n]).includes(c.value)) : p.find((c) => c.value === r[n]);
|
|
48
48
|
return {
|
|
49
49
|
values: r,
|
|
@@ -54,81 +54,81 @@ function q(t, n, r, s, p, l) {
|
|
|
54
54
|
currentOption: e
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function Q(t, n, r) {
|
|
58
58
|
const s = d(t);
|
|
59
59
|
if (!s.length) return [];
|
|
60
|
-
if (
|
|
60
|
+
if (ie(t, r)) return n;
|
|
61
61
|
const p = new Set(s);
|
|
62
62
|
return n.filter((l) => p.has(l.value));
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function X(t, n) {
|
|
65
65
|
const r = new Set(d(t));
|
|
66
66
|
return r.size ? n.filter((s) => !r.has(s.value)) : n;
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function v(t, n) {
|
|
69
69
|
var s;
|
|
70
70
|
const r = (s = t.value) == null ? void 0 : s[n];
|
|
71
71
|
return Array.isArray(r) ? r : [];
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function Be(t, n = {}) {
|
|
74
74
|
const r = [...new Set(t.map((e) => e.code))], s = t.reduce(
|
|
75
75
|
(e, c) => (e[c.code] = (e[c.code] || 0) + 1, e),
|
|
76
76
|
{}
|
|
77
|
-
), { dataSource: p } =
|
|
77
|
+
), { dataSource: p } = pe({
|
|
78
78
|
codes: r,
|
|
79
79
|
dataSource: n.dataSource
|
|
80
80
|
}), l = {};
|
|
81
81
|
return t.forEach((e) => {
|
|
82
|
-
var
|
|
83
|
-
const c =
|
|
82
|
+
var W;
|
|
83
|
+
const c = ce[e.code], u = e.fieldName || c.defaultFieldName, O = e.key || ((s[e.code] || 0) > 1 ? u : e.code), $ = e.label || c.defaultLabel, E = e.multiple ?? c.defaultMultiple, C = e.showAll ?? c.defaultShowAll, M = e.showAllField ?? b, m = e.mutexWith, F = le(e.code, e.groupBy), T = F === V.NONE, B = F === V.PINYIN, k = !T && !B, S = c.defaultTreeConfig, I = !!S, R = c.defaultShowNav ?? !1, ee = [
|
|
84
84
|
...m ? [m] : [],
|
|
85
|
-
...((
|
|
86
|
-
],
|
|
87
|
-
...
|
|
88
|
-
triggerFields:
|
|
89
|
-
} : e.dependencies,
|
|
85
|
+
...((W = e.dependencies) == null ? void 0 : W.triggerFields) || []
|
|
86
|
+
], U = [...new Set(ee)], te = _(e.dependencies || {}, ["triggerFields"]), ne = U.length ? {
|
|
87
|
+
...te,
|
|
88
|
+
triggerFields: U
|
|
89
|
+
} : e.dependencies, D = {
|
|
90
90
|
component: "TtPanelSelect",
|
|
91
91
|
fieldName: u,
|
|
92
92
|
label: $,
|
|
93
93
|
rules: e.rules,
|
|
94
|
-
dependencies:
|
|
94
|
+
dependencies: ne,
|
|
95
95
|
componentProps: (o, x) => {
|
|
96
|
-
const A =
|
|
97
|
-
let a = m ?
|
|
98
|
-
|
|
99
|
-
const g =
|
|
96
|
+
const A = v(p, e.code);
|
|
97
|
+
let a = m ? X(o[m], A) : A;
|
|
98
|
+
f(e.customOptions) && (a = e.customOptions(o, a) || []);
|
|
99
|
+
const g = k ? j(a, F) : a, L = Z(e.componentProps, o, x, a), { onChange: Y, ...w } = L;
|
|
100
100
|
return {
|
|
101
101
|
multiple: E,
|
|
102
|
-
showAll:
|
|
102
|
+
showAll: C,
|
|
103
103
|
showAllField: M,
|
|
104
|
-
showNav:
|
|
105
|
-
showOriginMode:
|
|
106
|
-
showPinyinMode:
|
|
104
|
+
showNav: R,
|
|
105
|
+
showOriginMode: T,
|
|
106
|
+
showPinyinMode: I ? !1 : B,
|
|
107
107
|
...S ? { treeConfig: S } : {},
|
|
108
108
|
...w,
|
|
109
|
-
...E ? { placeholder:
|
|
109
|
+
...E ? { placeholder: q(w.placeholder) } : {},
|
|
110
110
|
options: g,
|
|
111
111
|
onChange(y) {
|
|
112
112
|
var P;
|
|
113
113
|
if (m) {
|
|
114
|
-
const i = Array.isArray(o[m]), h =
|
|
115
|
-
|
|
114
|
+
const i = Array.isArray(o[m]), h = X(y, A);
|
|
115
|
+
H(o, m, h, i);
|
|
116
116
|
}
|
|
117
117
|
if (e.exclude) {
|
|
118
|
-
const i = e.exclude.fieldName, h = e.exclude.multiple ?? !0,
|
|
119
|
-
d(y).length ?
|
|
118
|
+
const i = e.exclude.fieldName, h = e.exclude.multiple ?? !0, G = Q(y, A, M);
|
|
119
|
+
d(y).length ? H(o, i, G, h) : o[i] = h ? [] : void 0;
|
|
120
120
|
}
|
|
121
121
|
(P = e.onChange) == null || P.call(
|
|
122
122
|
e,
|
|
123
123
|
y,
|
|
124
|
-
|
|
124
|
+
J(e.code, u, o, x, a, E)
|
|
125
125
|
);
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
};
|
|
130
|
-
if (l[
|
|
131
|
-
...
|
|
130
|
+
if (l[O] = {
|
|
131
|
+
...D,
|
|
132
132
|
..._(e, [
|
|
133
133
|
"code",
|
|
134
134
|
"key",
|
|
@@ -150,11 +150,11 @@ function Me(t, n = {}) {
|
|
|
150
150
|
label: $,
|
|
151
151
|
rules: e.rules,
|
|
152
152
|
description: e.description,
|
|
153
|
-
dependencies:
|
|
154
|
-
componentProps:
|
|
153
|
+
dependencies: D.dependencies,
|
|
154
|
+
componentProps: D.componentProps,
|
|
155
155
|
component: "TtPanelSelect"
|
|
156
156
|
}, e.exclude) {
|
|
157
|
-
const o = e.exclude, x = o.fieldName, A = o.key || `exclude${
|
|
157
|
+
const o = e.exclude, x = o.fieldName, A = o.key || `exclude${ae(O)}`, a = o.label || c.defaultExcludeLabel, g = o.multiple ?? !0, L = o.showAll ?? !1, Y = o.showAllField ?? b, w = o.dependencies || {}, y = {
|
|
158
158
|
...w,
|
|
159
159
|
triggerFields: w.triggerFields ?? [u],
|
|
160
160
|
if: w.if ?? ((i) => d(i[u]).length > 0)
|
|
@@ -165,24 +165,24 @@ function Me(t, n = {}) {
|
|
|
165
165
|
rules: o.rules,
|
|
166
166
|
dependencies: y,
|
|
167
167
|
componentProps: (i, h) => {
|
|
168
|
-
const
|
|
168
|
+
const G = v(p, e.code), N = Q(i[u], G, M), oe = k ? j(N, F) : N, re = Z(o.componentProps, i, h, N), { onChange: de, ...z } = re;
|
|
169
169
|
return {
|
|
170
170
|
multiple: g,
|
|
171
|
-
showAll:
|
|
172
|
-
showAllField:
|
|
173
|
-
showNav:
|
|
174
|
-
showOriginMode:
|
|
175
|
-
showPinyinMode:
|
|
171
|
+
showAll: L,
|
|
172
|
+
showAllField: Y,
|
|
173
|
+
showNav: R,
|
|
174
|
+
showOriginMode: T,
|
|
175
|
+
showPinyinMode: I ? !1 : B,
|
|
176
176
|
...S ? { treeConfig: S } : {},
|
|
177
|
-
...
|
|
178
|
-
...g ? { placeholder:
|
|
179
|
-
options:
|
|
180
|
-
onChange(
|
|
181
|
-
var
|
|
182
|
-
(
|
|
177
|
+
...z,
|
|
178
|
+
...g ? { placeholder: q(z.placeholder) } : {},
|
|
179
|
+
options: oe,
|
|
180
|
+
onChange(se) {
|
|
181
|
+
var K;
|
|
182
|
+
(K = o.onChange) == null || K.call(
|
|
183
183
|
o,
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
se,
|
|
185
|
+
J(e.code, x, i, h, N, g)
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
188
|
};
|
|
@@ -216,5 +216,5 @@ function Me(t, n = {}) {
|
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
218
|
export {
|
|
219
|
-
|
|
219
|
+
Be as usePanelSelectSchemas
|
|
220
220
|
};
|
|
@@ -13,6 +13,7 @@ import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js
|
|
|
13
13
|
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
14
14
|
import "lodash-es";
|
|
15
15
|
import { useElementScreenshot as y } from "../packages/hooks/src/useElementScreenshot.js";
|
|
16
|
+
import "vue-router";
|
|
16
17
|
import { GlobalConfig as g } from "./useSetup.js";
|
|
17
18
|
function O(r = "png") {
|
|
18
19
|
const e = r === "jpeg" ? "jpg" : "png";
|
|
@@ -45,7 +46,7 @@ async function p(r, e) {
|
|
|
45
46
|
const s = k(e == null ? void 0 : e.uploadOssApi), n = (e == null ? void 0 : e.format) ?? "png", o = (e == null ? void 0 : e.fileName) ?? O(n), t = h(r, o), a = await s(t), c = await x(t, a, e == null ? void 0 : e.ossDir);
|
|
46
47
|
return { blob: r, file: t, ossKey: c };
|
|
47
48
|
}
|
|
48
|
-
function
|
|
49
|
+
function L() {
|
|
49
50
|
const r = y();
|
|
50
51
|
async function e(o, t) {
|
|
51
52
|
const a = await r.captureToBlob(o, t);
|
|
@@ -79,5 +80,5 @@ function D() {
|
|
|
79
80
|
};
|
|
80
81
|
}
|
|
81
82
|
export {
|
|
82
|
-
|
|
83
|
+
L as useScreenshotOss
|
|
83
84
|
};
|
|
@@ -14,6 +14,7 @@ import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb
|
|
|
14
14
|
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
15
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
16
|
import { kebabToCamelCase as I } from "../../packages/hooks/src/tools.js";
|
|
17
|
+
import "vue-router";
|
|
17
18
|
const D = [
|
|
18
19
|
"modelValue",
|
|
19
20
|
"onUpdate:modelValue",
|
|
@@ -34,7 +35,7 @@ function j(a) {
|
|
|
34
35
|
inactive: t.inactiveValue ?? O
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
+
function oe() {
|
|
38
39
|
return {
|
|
39
40
|
install(a) {
|
|
40
41
|
a.renderer.add("switchStatus", {
|
|
@@ -98,5 +99,5 @@ function te() {
|
|
|
98
99
|
};
|
|
99
100
|
}
|
|
100
101
|
export {
|
|
101
|
-
|
|
102
|
+
oe as createVxePluginSwitchStatus
|
|
102
103
|
};
|