@dazhicheng/ui 1.5.201 → 1.5.202
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/assets/svg/RiRefreshLine.svg.js +4 -0
- package/dist/assets/svg/add.svg.js +4 -0
- package/dist/assets/svg/addCircleLine.svg.js +4 -0
- package/dist/assets/svg/arrowDown.svg.js +4 -0
- package/dist/assets/svg/arrowLineDown.svg.js +5 -0
- package/dist/assets/svg/arrowSUp.svg.js +4 -0
- package/dist/assets/svg/arrowUp.svg.js +4 -0
- package/dist/assets/svg/columnSet.svg.js +4 -0
- package/dist/assets/svg/determinateCircleLine.svg.js +5 -0
- package/dist/assets/svg/drag.svg.js +5 -0
- package/dist/assets/svg/exportSvg.svg.js +4 -0
- package/dist/assets/svg/fileSvg.svg.js +4 -0
- package/dist/assets/svg/help.svg.js +4 -0
- package/dist/components/tt-area/TtArea.vue.js +1 -1
- package/dist/components/tt-button/components/AddButton.vue.js +2 -2
- package/dist/components/tt-checkbox/index.vue.js +7 -7
- package/dist/components/tt-drawer/index.js +1 -1
- package/dist/components/tt-drawer/src/RenderDrawer.vue.js +18 -17
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +1 -1
- package/dist/components/tt-drawer/src/props.js +1 -1
- package/dist/components/tt-drawer/src/utils/drawer-api.js +1 -1
- package/dist/components/tt-empty/index.js +1 -1
- package/dist/components/tt-form/index.js +11 -17
- package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +3 -3
- package/dist/components/tt-form/src/components/FormActions.vue2.js +1 -1
- package/dist/components/tt-form/src/config.js +4 -4
- package/dist/components/tt-form/src/form/FormMessageToolTip.vue.js +1 -1
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +3 -4
- package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +6 -7
- package/dist/components/tt-form/src/form-render/form.vue2.js +4 -5
- package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +1 -1
- package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +25 -26
- package/dist/components/tt-form/src/index.vue2.js +5 -7
- package/dist/components/tt-form-item-error-tooltip/index.js +2 -2
- package/dist/components/tt-icon/components/AddIcon.vue.js +1 -1
- package/dist/components/tt-icon/components/SubIcon.vue.js +1 -1
- package/dist/components/tt-log/index.vue.js +5 -4
- package/dist/components/tt-modal/index.js +1 -1
- package/dist/components/tt-modal/src/RenderModal.vue.js +26 -26
- package/dist/components/tt-modal/src/props.js +1 -1
- package/dist/components/tt-modal/src/utils/modal-api.js +1 -1
- package/dist/components/tt-modal-form/index.vue.js +47 -24
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +14 -14
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.js +2 -2
- package/dist/components/tt-panel-select/src/components/PanelRight.vue.js +14 -14
- package/dist/components/tt-select/src/Select.vue.js +27 -27
- package/dist/components/tt-select/src/components/SelectTable.vue.js +1 -1
- package/dist/components/tt-select/src/components/Table.vue.js +2 -2
- package/dist/components/tt-table/index.js +48 -18
- package/dist/components/tt-table/src/Table.vue.js +2 -2
- package/dist/components/tt-table/src/TableForm.vue.js +120 -81
- package/dist/components/tt-table/src/components/TableAction.vue.js +3 -3
- package/dist/components/tt-table/src/components/TableButtons.js +9 -9
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +19 -18
- package/dist/components/tt-table/src/components/TableToobalTools.vue.js +4 -4
- package/dist/components/tt-table/src/hooks/useCellArea.js +1 -1
- package/dist/components/tt-table/src/hooks/useColumns.js +1 -1
- package/dist/components/tt-table/src/hooks/useCustomColumns.js +1 -1
- package/dist/components/tt-table/src/hooks/useDataSource.js +1 -1
- package/dist/components/tt-table/src/hooks/usePagination.js +1 -1
- package/dist/components/tt-table/src/hooks/useTableSlot.js +1 -1
- package/dist/components/tt-table/src/props.js +1 -1
- package/dist/components/tt-table/src/utils/table-api.js +1 -1
- package/dist/components/tt-text/index.vue2.js +1 -1
- package/dist/components/tt-upload/src/TtUpload.vue.js +71 -70
- package/dist/directives/dialog-resize/index.js +10 -10
- package/dist/hooks/useScreenshotOss.js +1 -1
- package/dist/hooks/useTable.js +13 -0
- package/dist/hooks/useTemplateSlot.js +13 -0
- package/dist/style.css +1 -1
- package/package.json +3 -3
- /package/dist/components/tt-area/{TtArea.vue2.js → TtArea.vue3.js} +0 -0
|
@@ -1,16 +1,55 @@
|
|
|
1
|
-
import { defineComponent as Me, useSlots as Ee, ref as Oe, computed as f, toValue as v, getCurrentInstance as Ae, unref as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as Me, useSlots as Ee, ref as Oe, computed as f, toValue as v, getCurrentInstance as Ae, unref as a, onMounted as U, watch as O, onUnmounted as _e, createElementBlock as q, openBlock as G, normalizeClass as B, createCommentVNode as ke, createElementVNode as Re, createVNode as A, renderSlot as g, createSlots as J, renderList as Q, withCtx as M, normalizeProps as X, guardReactiveProps as Y, mergeProps as Z, toHandlers as $e, nextTick as Be } from "vue";
|
|
2
|
+
import "../../tt-button/index.js";
|
|
3
|
+
import "../../tt-checkbox/index.js";
|
|
4
|
+
import "../../tt-empty/index.js";
|
|
5
|
+
import { extractResourceFromApi as Ve, generateTestId as _, kebabToCamelCase as Le, mergeWithArrayOverride as xe, isFunction as Ke } from "@dazhicheng/utils";
|
|
6
|
+
import "element-plus";
|
|
7
|
+
import "../../tt-select/index.js";
|
|
8
|
+
import "../../tt-panel-select/index.js";
|
|
9
|
+
import "../../tt-upload/index.js";
|
|
10
|
+
import "../../tt-api-component/index.js";
|
|
11
|
+
import "vee-validate";
|
|
12
|
+
import { useForm as je } from "../../tt-form/src/useForm.js";
|
|
13
|
+
import "zod";
|
|
14
|
+
import { omit as ze } from "lodash-es";
|
|
15
|
+
import "dayjs";
|
|
16
|
+
import "dayjs/plugin/timezone";
|
|
5
17
|
import { useStore as De } from "@tanstack/vue-store";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
18
|
+
import "es-toolkit/compat";
|
|
19
|
+
import "../../tt-form/src/shared/zod-defaults.js";
|
|
20
|
+
import "../../tt-nav-anchor/index.js";
|
|
21
|
+
import { useDesign as Ne, useDebounceFn as V } from "@dazhicheng/hooks";
|
|
22
|
+
import "../../tt-icon/index.js";
|
|
23
|
+
import "../../tt-form/src/components/Slot.js";
|
|
24
|
+
import "../../tt-form-item-error-tooltip/index.js";
|
|
25
|
+
import "@vueuse/core";
|
|
26
|
+
/* empty css */
|
|
27
|
+
import "../../tt-form/src/form/RenderContent.vue.js";
|
|
28
|
+
import "../../tt-form/src/form-render/FormFieldContact.js";
|
|
29
|
+
/* empty css */
|
|
30
|
+
/* empty css */
|
|
31
|
+
import "../../tt-image/index.js";
|
|
32
|
+
import "../../tt-drawer/index.js";
|
|
33
|
+
import "../../tt-modal/index.js";
|
|
34
|
+
import "../../tt-text/index.js";
|
|
35
|
+
import "../../../directives/disabled-tip/index.js";
|
|
36
|
+
import { GlobalConfig as He } from "../../../hooks/useSetup.js";
|
|
37
|
+
import "../../tt-log/index.js";
|
|
38
|
+
/* empty css */
|
|
39
|
+
/* empty css */
|
|
40
|
+
/* empty css */
|
|
41
|
+
/* empty css */
|
|
42
|
+
/* empty css */
|
|
43
|
+
import "../../tt-loading/index.js";
|
|
44
|
+
import "../index.js";
|
|
45
|
+
import "vue-router";
|
|
46
|
+
import "numeral";
|
|
47
|
+
import We from "xe-utils";
|
|
48
|
+
import Ue from "./components/TableColumnModal.vue2.js";
|
|
9
49
|
/* empty css */
|
|
10
|
-
import { provideFormActionTestIds as
|
|
11
|
-
import
|
|
50
|
+
import { provideFormActionTestIds as qe } from "./utils/context.js";
|
|
51
|
+
import Ge from "./components/TableToobalTools.vue.js";
|
|
12
52
|
import { basicTableEmits as ee } from "./emits.js";
|
|
13
|
-
import { GlobalConfig as Ge } from "@dazhicheng-ui/hooks/useSetup";
|
|
14
53
|
import Je from "./Table.vue.js";
|
|
15
54
|
/* empty css */
|
|
16
55
|
import { createTableFormContext as Qe } from "./hooks/useTableContext.js";
|
|
@@ -20,7 +59,7 @@ import { useTableSlot as Ze } from "./hooks/useTableSlot.js";
|
|
|
20
59
|
import { tableFormProps as et } from "./props.js";
|
|
21
60
|
import { getDefaultState as tt } from "./utils/table-api.js";
|
|
22
61
|
import { TableFormApi as ot } from "./utils/table-form-api.js";
|
|
23
|
-
const st = ["data-testid"],
|
|
62
|
+
const st = ["data-testid"], rt = ["data-testid"], co = /* @__PURE__ */ Me({
|
|
24
63
|
name: "TtTableForm",
|
|
25
64
|
__name: "TableForm",
|
|
26
65
|
props: et,
|
|
@@ -36,27 +75,27 @@ const st = ["data-testid"], at = ["data-testid"], Mt = /* @__PURE__ */ Me({
|
|
|
36
75
|
],
|
|
37
76
|
setup(te, { expose: oe, emit: se }) {
|
|
38
77
|
var N, H, W;
|
|
39
|
-
const
|
|
40
|
-
let t =
|
|
78
|
+
const p = te, T = se, L = Ee(), { prefixCls: k } = Ne("table-form"), w = Oe();
|
|
79
|
+
let t = p.tableFormApi;
|
|
41
80
|
if (!t) {
|
|
42
|
-
t = new ot(
|
|
81
|
+
t = new ot(p);
|
|
43
82
|
const e = t;
|
|
44
83
|
e.useStore = (o) => De(t.store, o), t = e;
|
|
45
84
|
}
|
|
46
85
|
const R = (N = t == null ? void 0 : t.useStore) == null ? void 0 : N.call(t), C = f(() => {
|
|
47
86
|
var o;
|
|
48
|
-
if (
|
|
87
|
+
if (p.testId) return p.testId;
|
|
49
88
|
const e = (o = v(R)) == null ? void 0 : o.table;
|
|
50
|
-
return e != null && e.api ?
|
|
51
|
-
}),
|
|
52
|
-
submit:
|
|
53
|
-
reset:
|
|
89
|
+
return e != null && e.api ? Ve(e.api) : "table";
|
|
90
|
+
}), re = f(() => _(C.value, "tableform")), ae = f(() => _(C.value, "search-form-header")), ie = f(() => _(C.value, "search-btn-query")), le = f(() => _(C.value, "search-btn-reset")), ne = f(() => ({
|
|
91
|
+
submit: ie.value,
|
|
92
|
+
reset: le.value
|
|
54
93
|
}));
|
|
55
|
-
|
|
56
|
-
const x = {},
|
|
57
|
-
tableData:
|
|
94
|
+
qe(ne);
|
|
95
|
+
const x = {}, u = Ae(), S = f(() => v(R)), { getFormSlotKeysFunc: me, getTableSlotKeysFunc: pe, replaceTableSlotKey: ue, replaceFormSlotKey: ce } = Ze(), {
|
|
96
|
+
tableData: de,
|
|
58
97
|
getFormProps: $,
|
|
59
|
-
getTableProps:
|
|
98
|
+
getTableProps: c,
|
|
60
99
|
getTableToolProps: be,
|
|
61
100
|
handleSearchInfoChange: K
|
|
62
101
|
} = Xe(
|
|
@@ -80,33 +119,33 @@ const st = ["data-testid"], at = ["data-testid"], Mt = /* @__PURE__ */ Me({
|
|
|
80
119
|
},
|
|
81
120
|
200,
|
|
82
121
|
{ leading: !0 }
|
|
83
|
-
), [he, s] =
|
|
122
|
+
), [he, s] = je({
|
|
84
123
|
...v($),
|
|
85
124
|
handleSubmit: ge,
|
|
86
125
|
handleReset: fe,
|
|
87
126
|
submitOnEnter: !0,
|
|
88
127
|
submitButtonOptions: {
|
|
89
|
-
content: (H =
|
|
128
|
+
content: (H = He.form) == null ? void 0 : H.submitTitle
|
|
90
129
|
},
|
|
91
130
|
showCollapseButton: !0,
|
|
92
131
|
collapsed: !0,
|
|
93
132
|
collapseTriggerResize: !0
|
|
94
133
|
}), { initCustomSetting: Ce, saveColumns: Se } = Ye({
|
|
95
|
-
getTableProps:
|
|
134
|
+
getTableProps: c,
|
|
96
135
|
tableMethods: t.tableApi,
|
|
97
136
|
getProps: S
|
|
98
137
|
}), j = async () => {
|
|
99
138
|
await Be(), t.tableApi && t.tableApi.redoHeight();
|
|
100
139
|
};
|
|
101
140
|
ee.forEach((e) => {
|
|
102
|
-
const o =
|
|
103
|
-
x[o] = (...
|
|
141
|
+
const o = We.camelCase(e);
|
|
142
|
+
x[o] = (...r) => T(e, ...r);
|
|
104
143
|
});
|
|
105
144
|
const ve = {
|
|
106
145
|
...x
|
|
107
146
|
};
|
|
108
147
|
function Te(e) {
|
|
109
|
-
t.setState((o) => o.table ? (o.table.getSyncSlotComponent =
|
|
148
|
+
t.setState((o) => o.table ? (o.table.getSyncSlotComponent = p.table.getSyncSlotComponent, xe(
|
|
110
149
|
{
|
|
111
150
|
...e,
|
|
112
151
|
table: {
|
|
@@ -119,14 +158,14 @@ const st = ["data-testid"], at = ["data-testid"], Mt = /* @__PURE__ */ Me({
|
|
|
119
158
|
}
|
|
120
159
|
const { run: we } = V(
|
|
121
160
|
async (e) => {
|
|
122
|
-
s.isMounted &&
|
|
161
|
+
s.isMounted && a(S).useSearchForm ? s.validate().then(async (o) => {
|
|
123
162
|
if (o.valid) {
|
|
124
|
-
const
|
|
163
|
+
const r = await s.getValues();
|
|
125
164
|
await t.tableApi.reload({
|
|
126
165
|
...e,
|
|
127
166
|
searchInfo: {
|
|
128
167
|
...e == null ? void 0 : e.searchInfo,
|
|
129
|
-
...
|
|
168
|
+
...r
|
|
130
169
|
}
|
|
131
170
|
});
|
|
132
171
|
}
|
|
@@ -150,38 +189,38 @@ const st = ["data-testid"], at = ["data-testid"], Mt = /* @__PURE__ */ Me({
|
|
|
150
189
|
};
|
|
151
190
|
async function ye() {
|
|
152
191
|
const { tableRefreshBefore: e } = S.value;
|
|
153
|
-
e &&
|
|
192
|
+
e && Ke(e) && await e(), E.reload();
|
|
154
193
|
}
|
|
155
194
|
async function Fe(e) {
|
|
156
|
-
var
|
|
157
|
-
const o = ((
|
|
195
|
+
var d, m;
|
|
196
|
+
const o = ((m = (d = S.value) == null ? void 0 : d.table) == null ? void 0 : m.columns) || [], r = new Map(o.map((n) => [n.field, n])), l = e.checkedModel.map((n) => r.get(n)).filter(Boolean);
|
|
158
197
|
if (e.isExport) {
|
|
159
198
|
T("export", e.checkedModel, e.modalApi);
|
|
160
199
|
return;
|
|
161
200
|
}
|
|
162
201
|
e.modalApi.setModalProps({
|
|
163
202
|
confirmLoading: !0
|
|
164
|
-
}),
|
|
203
|
+
}), c.value.useHttpCache && await Se(JSON.stringify(e.checkedModel)), t.tableApi.setTableColumns(l), e.modalApi.setModalProps({
|
|
165
204
|
confirmLoading: !1
|
|
166
|
-
}), e.modalApi.closeModal(), T("set-columns",
|
|
205
|
+
}), e.modalApi.closeModal(), T("set-columns", l);
|
|
167
206
|
}
|
|
168
207
|
function z(e = !1) {
|
|
169
|
-
var
|
|
170
|
-
const { notSetColumnField: o, columns:
|
|
208
|
+
var m, n, h, b, y, F, P, I;
|
|
209
|
+
const { notSetColumnField: o, columns: r } = a(c), l = (b = (h = (n = ((m = t.tableApi.getTableInstance()) == null ? void 0 : m.getTableColumn()) || []) == null ? void 0 : n.visibleColumn) == null ? void 0 : h.map((i) => i.field)) == null ? void 0 : b.filter(Boolean), d = ((F = (y = a(r)) == null ? void 0 : y.filter((i) => i.visible === !0 || i.visible === void 0)) == null ? void 0 : F.map((i) => i.field)) || [];
|
|
171
210
|
(P = w.value) == null || P.openModal({
|
|
172
|
-
columns: v(
|
|
173
|
-
displayFields: e ?
|
|
211
|
+
columns: v(r) || [],
|
|
212
|
+
displayFields: e ? d : l,
|
|
174
213
|
disabledColumnField: o || []
|
|
175
214
|
}), (I = w.value) == null || I.setModalProps({
|
|
176
215
|
title: "列设置"
|
|
177
216
|
});
|
|
178
217
|
}
|
|
179
218
|
function D(e = !1) {
|
|
180
|
-
var
|
|
181
|
-
const { notSetColumnField: o, columns:
|
|
219
|
+
var m, n, h, b, y, F, P, I;
|
|
220
|
+
const { notSetColumnField: o, columns: r } = a(c), l = (b = (h = (n = ((m = t.tableApi.getTableInstance()) == null ? void 0 : m.getTableColumn()) || []) == null ? void 0 : n.visibleColumn) == null ? void 0 : h.map((i) => i.field)) == null ? void 0 : b.filter(Boolean), d = ((F = (y = a(r)) == null ? void 0 : y.filter((i) => i.visible === !0 || i.visible === void 0)) == null ? void 0 : F.map((i) => i.field)) || [];
|
|
182
221
|
(P = w.value) == null || P.openModal({
|
|
183
|
-
columns: v(
|
|
184
|
-
displayFields: e ?
|
|
222
|
+
columns: v(r) || [],
|
|
223
|
+
displayFields: e ? d : l,
|
|
185
224
|
disabledColumnField: o || [],
|
|
186
225
|
isExport: !0
|
|
187
226
|
}), (I = w.value) == null || I.setModalProps({
|
|
@@ -189,7 +228,7 @@ const st = ["data-testid"], at = ["data-testid"], Mt = /* @__PURE__ */ Me({
|
|
|
189
228
|
});
|
|
190
229
|
}
|
|
191
230
|
Qe({ formInstance: s }), U(() => {
|
|
192
|
-
|
|
231
|
+
u && T("register", E, u == null ? void 0 : u.uid), setTimeout(() => {
|
|
193
232
|
Ce();
|
|
194
233
|
}, 16);
|
|
195
234
|
}), O(
|
|
@@ -207,7 +246,7 @@ const st = ["data-testid"], at = ["data-testid"], Mt = /* @__PURE__ */ Me({
|
|
|
207
246
|
},
|
|
208
247
|
{ deep: !0 }
|
|
209
248
|
), O(
|
|
210
|
-
() =>
|
|
249
|
+
() => c.value,
|
|
211
250
|
(e) => {
|
|
212
251
|
var o;
|
|
213
252
|
t != null && t.tableApi && ((o = t == null ? void 0 : t.tableApi) == null || o.setState(e));
|
|
@@ -220,69 +259,69 @@ const st = ["data-testid"], at = ["data-testid"], Mt = /* @__PURE__ */ Me({
|
|
|
220
259
|
return Object.fromEntries(Object.entries(e).filter(([o]) => !o.startsWith("on")));
|
|
221
260
|
}
|
|
222
261
|
function Ie(e, o) {
|
|
223
|
-
return Object.fromEntries(Object.keys(e).map((
|
|
262
|
+
return Object.fromEntries(Object.keys(e).map((r) => [r, o[r]]));
|
|
224
263
|
}
|
|
225
264
|
return O(
|
|
226
|
-
() =>
|
|
265
|
+
() => ze(p, ["tableFormApi"]),
|
|
227
266
|
() => {
|
|
228
|
-
var
|
|
229
|
-
const e = {}, o = ((
|
|
230
|
-
for (const [
|
|
231
|
-
const b =
|
|
232
|
-
|
|
267
|
+
var m;
|
|
268
|
+
const e = {}, o = ((m = u == null ? void 0 : u.vnode) == null ? void 0 : m.props) || {}, r = new Set(Object.keys(p));
|
|
269
|
+
for (const [n, h] of Object.entries(o)) {
|
|
270
|
+
const b = Le(n);
|
|
271
|
+
r.has(b) && (e[b] = h);
|
|
233
272
|
}
|
|
234
|
-
const
|
|
235
|
-
t.setState(
|
|
273
|
+
const l = Pe(e), d = Ie(l, p);
|
|
274
|
+
t.setState(d);
|
|
236
275
|
},
|
|
237
276
|
{ deep: !0 }
|
|
238
277
|
), _e(() => {
|
|
239
278
|
t == null || t.unmount(), window.removeEventListener("resize", j);
|
|
240
|
-
}), oe({ ...E, instance:
|
|
241
|
-
class: B(
|
|
242
|
-
"data-testid":
|
|
279
|
+
}), oe({ ...E, instance: u }), (e, o) => (G(), q("div", {
|
|
280
|
+
class: B(a(k)),
|
|
281
|
+
"data-testid": re.value
|
|
243
282
|
}, [
|
|
244
283
|
S.value.useSearchForm ? (G(), q("div", {
|
|
245
284
|
key: 0,
|
|
246
|
-
class: B(`${
|
|
247
|
-
"data-testid":
|
|
285
|
+
class: B(`${a(k)}-header`),
|
|
286
|
+
"data-testid": ae.value
|
|
248
287
|
}, [
|
|
249
|
-
A(
|
|
288
|
+
A(a(he), {
|
|
250
289
|
"test-id": `${C.value}-search-form`
|
|
251
290
|
}, J({ _: 2 }, [
|
|
252
|
-
Q(
|
|
253
|
-
name:
|
|
254
|
-
fn: M((
|
|
255
|
-
g(e.$slots,
|
|
291
|
+
Q(a(me)(a(L)), (r) => ({
|
|
292
|
+
name: a(ce)(r),
|
|
293
|
+
fn: M((l) => [
|
|
294
|
+
g(e.$slots, r, X(Y(l || {})))
|
|
256
295
|
])
|
|
257
296
|
}))
|
|
258
297
|
]), 1032, ["test-id"]),
|
|
259
298
|
g(e.$slots, "header-down")
|
|
260
|
-
], 10,
|
|
299
|
+
], 10, rt)) : ke("", !0),
|
|
261
300
|
Re("div", {
|
|
262
301
|
class: B({
|
|
263
|
-
[`${
|
|
302
|
+
[`${a(k)}-wrapper`]: !0,
|
|
264
303
|
"pt-(--tt-base-padding)!": !0,
|
|
265
|
-
"pb-(--tt-base-padding)!": !
|
|
304
|
+
"pb-(--tt-base-padding)!": !a(c).showPager
|
|
266
305
|
})
|
|
267
306
|
}, [
|
|
268
307
|
g(e.$slots, "table-top"),
|
|
269
|
-
A(Je, Z(
|
|
270
|
-
data:
|
|
308
|
+
A(Je, Z(a(c), {
|
|
309
|
+
data: a(de),
|
|
271
310
|
"table-row-id": e.tableRowId,
|
|
272
311
|
"table-id": C.value,
|
|
273
|
-
"form-api":
|
|
274
|
-
"table-api":
|
|
312
|
+
"form-api": a(s),
|
|
313
|
+
"table-api": a(t).tableApi
|
|
275
314
|
}, $e(ve)), J({ _: 2 }, [
|
|
276
|
-
Q(
|
|
277
|
-
name:
|
|
278
|
-
fn: M((
|
|
279
|
-
g(e.$slots,
|
|
315
|
+
Q(a(pe)(a(L)), (r) => ({
|
|
316
|
+
name: a(ue)(r),
|
|
317
|
+
fn: M((l) => [
|
|
318
|
+
g(e.$slots, r, X(Y(l || {})))
|
|
280
319
|
])
|
|
281
320
|
})),
|
|
282
|
-
|
|
321
|
+
a(c).showToolbar ? {
|
|
283
322
|
name: "toolbar_tools",
|
|
284
323
|
fn: M(() => [
|
|
285
|
-
A(
|
|
324
|
+
A(Ge, Z(a(be), {
|
|
286
325
|
onOnRefresh: ye,
|
|
287
326
|
onOnExport: D,
|
|
288
327
|
onOnColumnsSetting: z
|
|
@@ -302,7 +341,7 @@ const st = ["data-testid"], at = ["data-testid"], Mt = /* @__PURE__ */ Me({
|
|
|
302
341
|
]), 1040, ["data", "table-row-id", "table-id", "form-api", "table-api"]),
|
|
303
342
|
g(e.$slots, "table-bottom")
|
|
304
343
|
], 2),
|
|
305
|
-
A(
|
|
344
|
+
A(Ue, {
|
|
306
345
|
ref_key: "tableColumnModalRef",
|
|
307
346
|
ref: w,
|
|
308
347
|
"open-export": D,
|
|
@@ -313,5 +352,5 @@ const st = ["data-testid"], at = ["data-testid"], Mt = /* @__PURE__ */ Me({
|
|
|
313
352
|
}
|
|
314
353
|
});
|
|
315
354
|
export {
|
|
316
|
-
|
|
355
|
+
co as default
|
|
317
356
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as q, useAttrs as G, ref as x, inject as _, computed as a, unref as r, toRaw as S, h as J, createElementBlock as s, openBlock as i, normalizeClass as h, createVNode as k, createBlock as c, createCommentVNode as u, withCtx as p, Fragment as f, renderList as A, renderSlot as Q, withDirectives as F, mergeProps as Z, normalizeStyle as W, toDisplayString as E, createElementVNode as ee, withModifiers as te, createSlots as oe, createTextVNode as re } from "vue";
|
|
2
2
|
import { propTypes as v, useDesign as ne } from "@dazhicheng/hooks";
|
|
3
3
|
import { calcWordsWidth as le, isBoolean as ie, isFunction as se, generateTestId as M, toKebabCase as P, isArray as de, isObject as ae } from "@dazhicheng/utils";
|
|
4
|
-
import { TtButton as C } from "
|
|
5
|
-
import { TtIcon as I } from "
|
|
6
|
-
import R from "
|
|
4
|
+
import { TtButton as C } from "../../../tt-button/index.js";
|
|
5
|
+
import { TtIcon as I } from "../../../tt-icon/index.js";
|
|
6
|
+
import R from "../../../../directives/disabled-tip/index.js";
|
|
7
7
|
import { ElDivider as ue, ElSpace as pe, ElPopover as ce } from "element-plus";
|
|
8
8
|
import fe from "../../../../assets/svg/action_more.svg.js";
|
|
9
9
|
import { ROW_INDEX_KEY as me } from "./RowContext.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as I, inject as S, computed as d, toRaw as k, createVNode as n, resolveComponent as P, unref as f, isVNode as j, mergeProps as
|
|
2
|
-
import { propTypes as
|
|
1
|
+
import { defineComponent as I, inject as S, computed as d, toRaw as k, createVNode as n, resolveComponent as P, unref as f, isVNode as j, mergeProps as c, withDirectives as F, resolveDirective as $ } from "vue";
|
|
2
|
+
import { propTypes as a, useDesign as x } from "@dazhicheng/hooks";
|
|
3
3
|
import { isBoolean as z, isFunction as b, generateTestId as D, toKebabCase as N, isArray as O, isObject as A } from "@dazhicheng/utils";
|
|
4
|
-
import { TtButton as R } from "
|
|
5
|
-
import { TtIcon as m } from "
|
|
6
|
-
import U from "
|
|
4
|
+
import { TtButton as R } from "../../../tt-button/index.js";
|
|
5
|
+
import { TtIcon as m } from "../../../tt-icon/index.js";
|
|
6
|
+
import U from "../../../../directives/disabled-tip/index.js";
|
|
7
7
|
import { ElPopover as V } from "element-plus";
|
|
8
8
|
import { componentMap as _ } from "../componentMap.js";
|
|
9
9
|
/* empty css */
|
|
@@ -22,9 +22,9 @@ const X = /* @__PURE__ */ I({
|
|
|
22
22
|
default: () => []
|
|
23
23
|
},
|
|
24
24
|
/** 分割线 */
|
|
25
|
-
divider:
|
|
25
|
+
divider: a.bool.def(!0),
|
|
26
26
|
/** 是否阻止默认行为 */
|
|
27
|
-
stopButtonPropagation:
|
|
27
|
+
stopButtonPropagation: a.bool.def(!0)
|
|
28
28
|
},
|
|
29
29
|
setup(l, {
|
|
30
30
|
slots: g
|
|
@@ -52,7 +52,7 @@ const X = /* @__PURE__ */ I({
|
|
|
52
52
|
const r = e[t];
|
|
53
53
|
return r ? r(o) : null;
|
|
54
54
|
}
|
|
55
|
-
const u = (e, t) => F(n(R,
|
|
55
|
+
const u = (e, t) => F(n(R, c({
|
|
56
56
|
disabled: B(e.disabledTip, e.disabled),
|
|
57
57
|
key: t,
|
|
58
58
|
style: {
|
|
@@ -95,7 +95,7 @@ const X = /* @__PURE__ */ I({
|
|
|
95
95
|
...i
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
|
-
return t.slot ? w(g, t.slot, t) : t.component ? n(r,
|
|
98
|
+
return t.slot ? w(g, t.slot, t) : t.component ? n(r, c({
|
|
99
99
|
key: o
|
|
100
100
|
}, t), null) : u(t, o);
|
|
101
101
|
});
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { defineComponent as X, ref as T, reactive as Y, computed as C, watch as S, createBlock as E, openBlock as m, unref as n, normalizeClass as b, withCtx as c, createElementVNode as d, createVNode as a, toDisplayString as h, createElementBlock as v, Fragment as M, renderList as V, createTextVNode as _, createCommentVNode as Z, withModifiers as ee } from "vue";
|
|
2
|
-
import le from "
|
|
3
|
-
import te from "
|
|
4
|
-
import { TtIcon as B } from "
|
|
5
|
-
import { TtText as oe } from "
|
|
6
|
-
import
|
|
7
|
-
import { TtButton as
|
|
8
|
-
import { useDesign as
|
|
9
|
-
import { ElScrollbar as $, ElCheckbox as I, ElCheckboxGroup as
|
|
10
|
-
import { cloneDeep as
|
|
11
|
-
import
|
|
12
|
-
|
|
2
|
+
import le from "../../../../assets/svg/close.svg.js";
|
|
3
|
+
import te from "../../../../assets/svg/drag.svg.js";
|
|
4
|
+
import { TtIcon as B } from "../../../tt-icon/index.js";
|
|
5
|
+
import { TtText as oe } from "../../../tt-text/index.js";
|
|
6
|
+
import "../../../tt-modal/index.js";
|
|
7
|
+
import { TtButton as ne } from "../../../tt-button/index.js";
|
|
8
|
+
import { useDesign as se } from "@dazhicheng/hooks";
|
|
9
|
+
import { ElScrollbar as $, ElCheckbox as I, ElCheckboxGroup as ie, ElTooltip as de } from "element-plus";
|
|
10
|
+
import { cloneDeep as ce } from "lodash-es";
|
|
11
|
+
import ae from "sortablejs";
|
|
12
|
+
import { useModalRender as re } from "../../../tt-modal/src/hooks/useModalRender.js";
|
|
13
|
+
const ue = { class: "flex-1" }, me = { class: "cb flex items-center" }, fe = { class: "text-[var(--el-text-color-primary)] font-bold" }, pe = { class: "flex flex-col w-[200px] shrink-0" }, he = { class: "flex items-center justify-between px-15px pt-12px pb-6px text-xs text-[var(--el-text-color-regular)]" }, xe = { class: "flex items-center text-xs" }, Ce = ["onClick"], be = { class: "text-left" }, Be = /* @__PURE__ */ X({
|
|
13
14
|
__name: "TableColumnModal",
|
|
14
15
|
props: {
|
|
15
16
|
openColumn: { type: Function },
|
|
@@ -17,7 +18,7 @@ const ue = { class: "flex-1" }, me = { class: "cb flex items-center" }, fe = { c
|
|
|
17
18
|
},
|
|
18
19
|
emits: ["on-submit"],
|
|
19
20
|
setup(R, { expose: A, emit: N }) {
|
|
20
|
-
const r = R, j = N, { prefixCls: u } =
|
|
21
|
+
const r = R, j = N, { prefixCls: u } = se("table-column-modal"), F = T(), [z, x] = re(), k = T(!1), l = Y({
|
|
21
22
|
allColumns: [],
|
|
22
23
|
checkedFields: [],
|
|
23
24
|
selectedColumns: [],
|
|
@@ -50,7 +51,7 @@ const ue = { class: "flex-1" }, me = { class: "cb flex items-center" }, fe = { c
|
|
|
50
51
|
};
|
|
51
52
|
function U({ columns: e, displayFields: o = [], disabledColumnField: t, isExport: s }) {
|
|
52
53
|
k.value = s ?? !1, x.openModal();
|
|
53
|
-
const K =
|
|
54
|
+
const K = ce(e).filter((i) => i.field);
|
|
54
55
|
l.disabledColumnField = t, l.allColumns = K.map((i) => ({ ...i, disabled: t.includes(i.field) }));
|
|
55
56
|
const Q = new Set(l.allColumns.map((i) => i.field)), w = o.filter((i) => i && Q.has(i));
|
|
56
57
|
l.checkedFields = [...w], l.selectedColumns = w.map((i) => l.allColumns.find((W) => W.field === i)).filter(Boolean), g = setTimeout(H, 100);
|
|
@@ -58,7 +59,7 @@ const ue = { class: "flex-1" }, me = { class: "cb flex items-center" }, fe = { c
|
|
|
58
59
|
function H() {
|
|
59
60
|
var o;
|
|
60
61
|
const e = (o = n(F)) == null ? void 0 : o.querySelector(`.${u}-move-box`);
|
|
61
|
-
e && (f =
|
|
62
|
+
e && (f = ae.create(e, {
|
|
62
63
|
animation: 300,
|
|
63
64
|
handle: `.${u}-item-move:not(.is-disabled)`,
|
|
64
65
|
onStart: (t) => t.item.style.opacity = "0",
|
|
@@ -106,7 +107,7 @@ const ue = { class: "flex-1" }, me = { class: "cb flex items-center" }, fe = { c
|
|
|
106
107
|
}, {
|
|
107
108
|
beforeFooter: c(() => [
|
|
108
109
|
d("div", be, [
|
|
109
|
-
a(n(
|
|
110
|
+
a(n(ne), { onClick: J }, {
|
|
110
111
|
default: c(() => [...o[1] || (o[1] = [
|
|
111
112
|
_("重置", -1)
|
|
112
113
|
])]),
|
|
@@ -136,7 +137,7 @@ const ue = { class: "flex-1" }, me = { class: "cb flex items-center" }, fe = { c
|
|
|
136
137
|
_: 1
|
|
137
138
|
}, 8, ["model-value", "indeterminate"])
|
|
138
139
|
]),
|
|
139
|
-
a(n(
|
|
140
|
+
a(n(ie), {
|
|
140
141
|
modelValue: l.checkedFields,
|
|
141
142
|
"onUpdate:modelValue": o[0] || (o[0] = (t) => l.checkedFields = t),
|
|
142
143
|
class: "mb-10px w-full"
|
|
@@ -148,7 +149,7 @@ const ue = { class: "flex-1" }, me = { class: "cb flex items-center" }, fe = { c
|
|
|
148
149
|
disabled: t.disabled
|
|
149
150
|
}, {
|
|
150
151
|
default: c(() => [
|
|
151
|
-
a(n(
|
|
152
|
+
a(n(de), {
|
|
152
153
|
"show-after": 400,
|
|
153
154
|
content: t.title || "",
|
|
154
155
|
placement: "top"
|
|
@@ -229,5 +230,5 @@ const ue = { class: "flex-1" }, me = { class: "cb flex items-center" }, fe = { c
|
|
|
229
230
|
}
|
|
230
231
|
});
|
|
231
232
|
export {
|
|
232
|
-
|
|
233
|
+
Be as default
|
|
233
234
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as w, inject as E, computed as i, unref as n, ref as x, createElementBlock as a, openBlock as t, createBlock as d, createCommentVNode as f, withCtx as p, renderSlot as u, Fragment as h, renderList as I, createElementVNode as $, createVNode as y } from "vue";
|
|
2
|
-
import { TtIcon as A } from "
|
|
2
|
+
import { TtIcon as A } from "../../../tt-icon/index.js";
|
|
3
3
|
import { generateTestId as B } from "@dazhicheng/utils";
|
|
4
4
|
import { ElSpace as N, ElTooltip as V } from "element-plus";
|
|
5
5
|
import { toolProps as z } from "../toolProps.js";
|
|
6
|
-
import R from "
|
|
7
|
-
import j from "
|
|
8
|
-
import F from "
|
|
6
|
+
import R from "../../../../assets/svg/RiRefreshLine.svg.js";
|
|
7
|
+
import j from "../../../../assets/svg/exportSvg.svg.js";
|
|
8
|
+
import F from "../../../../assets/svg/columnSet.svg.js";
|
|
9
9
|
const L = ["data-testid"], P = ["onClick", "onAnimationend"], Q = /* @__PURE__ */ w({
|
|
10
10
|
__name: "TableToobalTools",
|
|
11
11
|
props: z,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { calcWordsWidth as G } from "@dazhicheng/utils";
|
|
2
2
|
import { ElMessage as Y } from "element-plus";
|
|
3
|
-
import { GlobalConfig as R } from "
|
|
3
|
+
import { GlobalConfig as R } from "../../../../hooks/useSetup.js";
|
|
4
4
|
import { isEqual as U, debounce as B, cloneDeep as L, flattenDeep as ee, isArray as ne, isFunction as te } from "lodash-es";
|
|
5
5
|
import { ref as x, shallowRef as le, computed as T, unref as n, watch as E, toValue as oe, watchEffect as ie, onUnmounted as se, nextTick as ue } from "vue";
|
|
6
6
|
function S(e) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlobalConfig as E } from "
|
|
1
|
+
import { GlobalConfig as E } from "../../../../hooks/useSetup.js";
|
|
2
2
|
import { compareObjects as $, isFunction as I } from "@dazhicheng/utils";
|
|
3
3
|
import { useDebounceFn as ie, useTimeoutFn as oe } from "@vueuse/core";
|
|
4
4
|
import { cloneDeep as y, set as L, get as A, isUndefined as ue } from "lodash-es";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mergeWithArrayOverride as m } from "@dazhicheng/utils";
|
|
2
|
-
import { GlobalConfig as c } from "
|
|
2
|
+
import { GlobalConfig as c } from "../../../../hooks/useSetup.js";
|
|
3
3
|
import { isEqual as l } from "lodash-es";
|
|
4
4
|
import { ref as s, unref as n, computed as P, watch as h } from "vue";
|
|
5
5
|
function S(o, u) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useTemplateSlot as e } from "
|
|
1
|
+
import { useTemplateSlot as e } from "../../../../hooks/useTemplateSlot.js";
|
|
2
2
|
function c() {
|
|
3
3
|
const { getSlotKeys: t, replaceSlotKey: o } = e("t-"), { getSlotKeys: l, replaceSlotKey: r } = e("form-");
|
|
4
4
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isFunction as f } from "@dazhicheng/utils";
|
|
2
2
|
import { propTypes as t } from "@dazhicheng/hooks";
|
|
3
|
-
import { GlobalConfig as l } from "
|
|
3
|
+
import { GlobalConfig as l } from "../../../hooks/useSetup.js";
|
|
4
4
|
const r = {
|
|
5
5
|
/** 是否显示分页 */
|
|
6
6
|
showPager: t.bool.def(!0),
|
|
@@ -2,7 +2,7 @@ var K = Object.defineProperty;
|
|
|
2
2
|
var A = (a, e, t) => e in a ? K(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
3
3
|
var s = (a, e, t) => A(a, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { mergeWithArrayOverride as r, StateHandler as H, bindMethods as I, isFunction as k } from "@dazhicheng/utils";
|
|
5
|
-
import { GlobalConfig as o } from "
|
|
5
|
+
import { GlobalConfig as o } from "../../../../hooks/useSetup.js";
|
|
6
6
|
import { Store as z } from "@tanstack/vue-store";
|
|
7
7
|
import { reactive as n, computed as l } from "vue";
|
|
8
8
|
function M() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as c, computed as s, withDirectives as u, createCommentVNode as d, createElementBlock as m, openBlock as f, normalizeStyle as y, renderSlot as T, createTextVNode as h, toDisplayString as b, unref as k } from "vue";
|
|
2
|
-
import x from "
|
|
2
|
+
import x from "../../directives/auto-tip/index.js";
|
|
3
3
|
import { ElMessage as C } from "element-plus";
|
|
4
4
|
const V = /* @__PURE__ */ c({
|
|
5
5
|
name: "TtText",
|