@dazhicheng/ui 1.5.265 → 1.6.0
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-area/TtArea.vue.js +1 -1
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
- package/dist/components/tt-drawer/src/hooks/useResizable.js +2 -2
- package/dist/components/tt-form/src/components/FormElInput.vue.js +51 -38
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +36 -36
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.d.ts +3 -3
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +3 -1
- package/dist/components/tt-icon/index.vue.js +2 -2
- package/dist/components/tt-loading/src/loading.vue.js +2 -2
- package/dist/components/tt-modal-form/index.vue.js +13 -12
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +2 -2
- package/dist/components/tt-panel-select/src/hooks/usePanelData.js +93 -86
- package/dist/components/tt-panel-select/src/index.vue.js +1 -0
- package/dist/components/tt-select/src/Select.vue.d.ts +4 -4
- package/dist/components/tt-select/src/components/Table.vue.d.ts +4 -4
- package/dist/components/tt-table/index.d.ts +523 -358
- package/dist/components/tt-table/index.js +7 -4
- package/dist/components/tt-table/src/Table.vue.d.ts +306 -216
- package/dist/components/tt-table/src/Table.vue.js +405 -618
- package/dist/components/tt-table/src/TableForm.vue.d.ts +384 -19
- package/dist/components/tt-table/src/TableForm.vue.js +219 -228
- package/dist/components/tt-table/src/components/TableAction.vue.js +108 -131
- package/dist/components/tt-table/src/components/TableButtons.js +25 -25
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +88 -85
- package/dist/components/tt-table/src/components/TableToolbarTools.vue.d.ts +80 -0
- package/dist/components/tt-table/src/components/{TableToobalTools.vue.js → TableToolbarTools.vue.js} +29 -31
- package/dist/components/tt-table/src/components/TableToolbarTools.vue2.js +4 -0
- package/dist/components/tt-table/src/emits.js +2 -1
- package/dist/components/tt-table/src/hooks/useColumnPersistence.d.ts +19 -0
- package/dist/components/tt-table/src/hooks/useColumnPersistence.js +63 -0
- package/dist/components/tt-table/src/hooks/useColumns.d.ts +505 -21
- package/dist/components/tt-table/src/hooks/useColumns.js +100 -245
- package/dist/components/tt-table/src/hooks/useGridProps.d.ts +36 -0
- package/dist/components/tt-table/src/hooks/useGridProps.js +121 -0
- package/dist/components/tt-table/src/hooks/useKeyboardNav.d.ts +11 -0
- package/dist/components/tt-table/src/hooks/useKeyboardNav.js +97 -0
- package/dist/components/tt-table/src/hooks/usePagination.d.ts +14 -8
- package/dist/components/tt-table/src/hooks/usePagination.js +29 -33
- package/dist/components/tt-table/src/hooks/useQuery.d.ts +41 -0
- package/dist/components/tt-table/src/hooks/useQuery.js +147 -0
- package/dist/components/tt-table/src/hooks/useRowIdentity.d.ts +22 -0
- package/dist/components/tt-table/src/hooks/useRowIdentity.js +96 -0
- package/dist/components/tt-table/src/hooks/useRowSelection.d.ts +23 -7
- package/dist/components/tt-table/src/hooks/useRowSelection.js +95 -71
- package/dist/components/tt-table/src/hooks/{useLeftRightSlot.d.ts → useSideSlot.d.ts} +25 -17
- package/dist/components/tt-table/src/hooks/useSideSlot.js +77 -0
- package/dist/components/tt-table/src/hooks/useSyncProps.d.ts +12 -0
- package/dist/components/tt-table/src/hooks/useSyncProps.js +55 -0
- package/dist/components/tt-table/src/hooks/useTableData.d.ts +71 -0
- package/dist/components/tt-table/src/hooks/useTableData.js +307 -0
- package/dist/components/tt-table/src/hooks/useTableFooter.d.ts +15 -0
- package/dist/components/tt-table/src/hooks/useTableFooter.js +46 -0
- package/dist/components/tt-table/src/hooks/useTableForm.d.ts +10 -5
- package/dist/components/tt-table/src/hooks/useTableForm.js +55 -48
- package/dist/components/tt-table/src/hooks/useTableMethods.d.ts +165 -0
- package/dist/components/tt-table/src/hooks/useTableMethods.js +183 -0
- package/dist/components/tt-table/src/hooks/useTableRender.d.ts +24 -55
- package/dist/components/tt-table/src/props.d.ts +318 -151
- package/dist/components/tt-table/src/props.js +117 -270
- package/dist/components/tt-table/src/table-defaults.d.ts +25 -0
- package/dist/components/tt-table/src/table-defaults.js +71 -0
- package/dist/components/tt-table/src/table-mutation-events.d.ts +43 -0
- package/dist/components/tt-table/src/table-mutation-events.js +70 -0
- package/dist/components/tt-table/src/types/table.d.ts +207 -88
- package/dist/components/tt-table/src/types/tableAction.d.ts +23 -0
- package/dist/components/tt-table/src/types/tableForm.d.ts +15 -26
- package/dist/components/tt-table/src/utils/action-tab-index.d.ts +2 -0
- package/dist/components/tt-table/src/utils/action-tab-index.js +50 -0
- package/dist/components/tt-table/src/utils/context.js +25 -12
- package/dist/components/tt-table/src/utils/table-api.d.ts +136 -58
- package/dist/components/tt-table/src/utils/table-api.js +198 -165
- package/dist/components/tt-table/src/utils/table-form-api.d.ts +11 -11
- package/dist/components/tt-table/src/utils/table-form-api.js +41 -31
- package/dist/components/types.d.ts +0 -20
- package/dist/hooks/useSetup.js +0 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +105 -101
- package/dist/packages/hooks/src/useDebounce.js +6 -6
- package/dist/packages/utils/src/is.js +20 -18
- package/dist/packages/utils/src/tool.js +76 -149
- package/dist/style.css +1 -1
- package/dist/utils/uppercaseInput.d.ts +29 -0
- package/dist/utils/uppercaseInput.js +16 -0
- package/package.json +3 -3
- package/dist/components/tt-table/src/components/TableToobalTools.vue.d.ts +0 -576
- package/dist/components/tt-table/src/components/TableToobalTools.vue2.js +0 -4
- package/dist/components/tt-table/src/enum.d.ts +0 -2
- package/dist/components/tt-table/src/hooks/useCellArea.d.ts +0 -15
- package/dist/components/tt-table/src/hooks/useCellArea.js +0 -15
- package/dist/components/tt-table/src/hooks/useCustomColumns.d.ts +0 -20
- package/dist/components/tt-table/src/hooks/useCustomColumns.js +0 -65
- package/dist/components/tt-table/src/hooks/useDataSource.d.ts +0 -29
- package/dist/components/tt-table/src/hooks/useDataSource.js +0 -232
- package/dist/components/tt-table/src/hooks/useLeftRightSlot.js +0 -64
- package/dist/components/tt-table/src/hooks/useTable.d.ts +0 -7
- package/dist/components/tt-table/src/hooks/useTableEvent.d.ts +0 -101
- package/dist/components/tt-table/src/hooks/useTableEvent.js +0 -197
- package/dist/components/tt-table/src/hooks/useTableFormEvent.d.ts +0 -10
- package/dist/components/tt-table/src/hooks/useTableHeight.d.ts +0 -15
- package/dist/components/tt-table/src/hooks/useTableSlot.d.ts +0 -11
- package/dist/components/tt-table/src/hooks/useTableSlot.js +0 -17
- package/dist/components/tt-table/src/utils/filters.d.ts +0 -109
- package/dist/components/tt-table/src/utils/vxeTable.d.ts +0 -28
- package/dist/packages/utils/src/check.js +0 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TtArea.vue3.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-116cb5cb"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import r from "./DrawerHeader.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ o(r, [["__scopeId", "data-v-6cdf82e0"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,80 +1,93 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { defineComponent as w, useAttrs as C, useSlots as P, computed as r, useTemplateRef as h, createBlock as k, openBlock as A, unref as p, mergeProps as I, createSlots as T, renderList as B, withCtx as E, renderSlot as V, normalizeProps as F, guardReactiveProps as L } from "vue";
|
|
2
|
+
import { createUppercaseInputProps as U } from "../../../../utils/uppercaseInput.js";
|
|
3
|
+
import { ElInput as $ } from "element-plus";
|
|
4
|
+
const H = /* @__PURE__ */ w({
|
|
4
5
|
inheritAttrs: !1,
|
|
5
6
|
__name: "FormElInput",
|
|
6
7
|
props: {
|
|
7
8
|
form: {}
|
|
8
9
|
},
|
|
9
|
-
setup(
|
|
10
|
-
const u = C(),
|
|
10
|
+
setup(j, { expose: c }) {
|
|
11
|
+
const u = C(), i = P(), l = r(() => {
|
|
12
|
+
const e = u;
|
|
13
|
+
if (e.uppercase !== !0)
|
|
14
|
+
return u;
|
|
15
|
+
const { uppercase: s, formatter: n, parser: o, ...a } = e;
|
|
16
|
+
return {
|
|
17
|
+
...a,
|
|
18
|
+
...U({
|
|
19
|
+
formatter: typeof n == "function" ? n : void 0,
|
|
20
|
+
parser: typeof o == "function" ? o : void 0
|
|
21
|
+
})
|
|
22
|
+
};
|
|
23
|
+
}), t = h("inputRef"), f = r(() => {
|
|
11
24
|
var e;
|
|
12
25
|
return (e = t.value) == null ? void 0 : e.input;
|
|
13
|
-
}),
|
|
26
|
+
}), m = r(() => {
|
|
14
27
|
var e;
|
|
15
28
|
return (e = t.value) == null ? void 0 : e.textarea;
|
|
16
|
-
}),
|
|
29
|
+
}), v = r(() => {
|
|
17
30
|
var e;
|
|
18
31
|
return (e = t.value) == null ? void 0 : e.ref;
|
|
19
|
-
}),
|
|
32
|
+
}), d = r(() => {
|
|
20
33
|
var e;
|
|
21
34
|
return (e = t.value) == null ? void 0 : e.textareaStyle;
|
|
22
|
-
}),
|
|
35
|
+
}), _ = r(() => {
|
|
23
36
|
var e;
|
|
24
37
|
return (e = t.value) == null ? void 0 : e.autosize;
|
|
25
|
-
}),
|
|
38
|
+
}), x = r(() => {
|
|
26
39
|
var e;
|
|
27
40
|
return (e = t.value) == null ? void 0 : e.isComposing;
|
|
28
|
-
}),
|
|
41
|
+
}), b = r(() => {
|
|
29
42
|
var e;
|
|
30
43
|
return (e = t.value) == null ? void 0 : e.passwordVisible;
|
|
31
44
|
});
|
|
32
|
-
function
|
|
45
|
+
function y() {
|
|
33
46
|
var e;
|
|
34
47
|
(e = t.value) == null || e.focus();
|
|
35
48
|
}
|
|
36
|
-
function
|
|
49
|
+
function z() {
|
|
37
50
|
var e;
|
|
38
51
|
(e = t.value) == null || e.blur();
|
|
39
52
|
}
|
|
40
|
-
function
|
|
53
|
+
function R() {
|
|
41
54
|
var e;
|
|
42
55
|
(e = t.value) == null || e.select();
|
|
43
56
|
}
|
|
44
|
-
function
|
|
45
|
-
var
|
|
46
|
-
(
|
|
57
|
+
function S(e) {
|
|
58
|
+
var s;
|
|
59
|
+
(s = t.value) == null || s.clear(e);
|
|
47
60
|
}
|
|
48
|
-
function
|
|
61
|
+
function g() {
|
|
49
62
|
var e;
|
|
50
63
|
(e = t.value) == null || e.resizeTextarea();
|
|
51
64
|
}
|
|
52
|
-
return
|
|
53
|
-
input:
|
|
54
|
-
textarea:
|
|
55
|
-
ref:
|
|
56
|
-
textareaStyle:
|
|
57
|
-
autosize:
|
|
58
|
-
isComposing:
|
|
59
|
-
passwordVisible:
|
|
60
|
-
focus:
|
|
61
|
-
blur:
|
|
62
|
-
select:
|
|
63
|
-
clear:
|
|
64
|
-
resizeTextarea:
|
|
65
|
-
}), (e,
|
|
65
|
+
return c({
|
|
66
|
+
input: f,
|
|
67
|
+
textarea: m,
|
|
68
|
+
ref: v,
|
|
69
|
+
textareaStyle: d,
|
|
70
|
+
autosize: _,
|
|
71
|
+
isComposing: x,
|
|
72
|
+
passwordVisible: b,
|
|
73
|
+
focus: y,
|
|
74
|
+
blur: z,
|
|
75
|
+
select: R,
|
|
76
|
+
clear: S,
|
|
77
|
+
resizeTextarea: g
|
|
78
|
+
}), (e, s) => (A(), k(p($), I({
|
|
66
79
|
ref_key: "inputRef",
|
|
67
80
|
ref: t
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
name:
|
|
71
|
-
fn:
|
|
72
|
-
|
|
81
|
+
}, l.value), T({ _: 2 }, [
|
|
82
|
+
B(p(i), (n, o) => ({
|
|
83
|
+
name: o,
|
|
84
|
+
fn: E((a) => [
|
|
85
|
+
V(e.$slots, o, F(L(a || {})))
|
|
73
86
|
])
|
|
74
87
|
}))
|
|
75
88
|
]), 1040));
|
|
76
89
|
}
|
|
77
90
|
});
|
|
78
91
|
export {
|
|
79
|
-
|
|
92
|
+
H as default
|
|
80
93
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ve, useTemplateRef as K, unref as l, computed as
|
|
1
|
+
import { defineComponent as ve, useTemplateRef as K, unref as l, computed as i, reactive as he, markRaw as be, toRaw as ye, watch as G, nextTick as Ce, onUnmounted as ge, createBlock as h, createCommentVNode as c, openBlock as u, mergeProps as k, withCtx as b, withDirectives as Fe, createVNode as F, createElementVNode as L, createElementBlock as H, normalizeClass as O, normalizeStyle as J, renderSlot as we, normalizeProps as Re, guardReactiveProps as Se, resolveDynamicComponent as Ne, createSlots as ke, renderList as Oe, Transition as Ee, vShow as Pe } from "vue";
|
|
2
2
|
import Be from "../form/FormControl.vue.js";
|
|
3
3
|
import Te from "../form/FormDescription.vue.js";
|
|
4
4
|
import Ve from "../form/FormItem.vue.js";
|
|
@@ -66,7 +66,7 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
66
66
|
commonComponentProps: {}
|
|
67
67
|
},
|
|
68
68
|
setup(n) {
|
|
69
|
-
const P = K("wrapperRef"), { componentBindEventMap: X, componentMap: Y, isVertical: C } = xe(), Z = Ke(), S = Ae(), _ = Me(n.fieldName), f = K("fieldComponentRef"), [ee, ne] = We(), j = l(ee).formApi,
|
|
69
|
+
const P = K("wrapperRef"), { componentBindEventMap: X, componentMap: Y, isVertical: C } = xe(), Z = Ke(), S = Ae(), _ = Me(n.fieldName), f = K("fieldComponentRef"), [ee, ne] = We(), j = l(ee).formApi, w = i(() => Z.compact), R = i(() => {
|
|
70
70
|
var e;
|
|
71
71
|
return ((e = _.value) == null ? void 0 : e.length) > 0;
|
|
72
72
|
}), B = he(
|
|
@@ -86,21 +86,21 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
86
86
|
* @returns 是否设置成功
|
|
87
87
|
*/
|
|
88
88
|
set(e, t, o) {
|
|
89
|
-
return Le(S.value, t, o), ne.validateField(t), !0;
|
|
89
|
+
return Le(S.value, t, o), ne.validateField(t, { warn: !1 }), !0;
|
|
90
90
|
}
|
|
91
91
|
})
|
|
92
|
-
), A =
|
|
92
|
+
), A = i(() => {
|
|
93
93
|
const e = y(n.component) ? Y.value[n.component] : n.component;
|
|
94
94
|
return be(ye(e));
|
|
95
95
|
}), { dynamicComponentProps: te, dynamicRules: oe, isDisabled: le, isIf: M, isRequired: T, isShow: U } = Ge(
|
|
96
96
|
() => n.dependencies
|
|
97
|
-
),
|
|
97
|
+
), ae = i(() => {
|
|
98
98
|
var e;
|
|
99
99
|
return (e = n.labelClass) != null && e.includes("w-") || C.value ? {} : {
|
|
100
100
|
width: `${n.labelWidth}px`
|
|
101
101
|
};
|
|
102
|
-
}), s =
|
|
103
|
-
var o,
|
|
102
|
+
}), s = i(() => oe.value || n.rules), D = i(() => !n.hide && M.value && U.value), V = i(() => {
|
|
103
|
+
var o, a, m;
|
|
104
104
|
if (!D.value)
|
|
105
105
|
return !1;
|
|
106
106
|
if (!s.value)
|
|
@@ -109,14 +109,14 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
109
109
|
return !0;
|
|
110
110
|
if (y(s.value))
|
|
111
111
|
return ["required", "selectRequired"].includes(s.value);
|
|
112
|
-
let e = (
|
|
112
|
+
let e = (a = (o = s == null ? void 0 : s.value) == null ? void 0 : o.isOptional) == null ? void 0 : a.call(o);
|
|
113
113
|
const t = s.value.def;
|
|
114
114
|
if ((t == null ? void 0 : t.type) === "default" && "innerType" in t) {
|
|
115
115
|
const v = t.innerType;
|
|
116
116
|
v && (e = (m = v.isOptional) == null ? void 0 : m.call(v));
|
|
117
117
|
}
|
|
118
118
|
return !e;
|
|
119
|
-
}),
|
|
119
|
+
}), ie = i(() => {
|
|
120
120
|
var o;
|
|
121
121
|
if (!D.value)
|
|
122
122
|
return null;
|
|
@@ -126,11 +126,11 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
126
126
|
if (y(e))
|
|
127
127
|
return e;
|
|
128
128
|
if (!!V.value) {
|
|
129
|
-
const
|
|
130
|
-
|
|
129
|
+
const a = (o = e == null ? void 0 : e.unwrap) == null ? void 0 : o.call(e);
|
|
130
|
+
a && (e = a);
|
|
131
131
|
}
|
|
132
132
|
return De(e);
|
|
133
|
-
}), r =
|
|
133
|
+
}), r = i(() => {
|
|
134
134
|
const e = $(n.componentProps) ? n.componentProps(S.value, j) : n.componentProps;
|
|
135
135
|
return {
|
|
136
136
|
...n.commonComponentProps,
|
|
@@ -138,7 +138,7 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
138
138
|
...te.value
|
|
139
139
|
};
|
|
140
140
|
}), { selectComponentProps: re } = Qe(
|
|
141
|
-
|
|
141
|
+
i(() => ({
|
|
142
142
|
componentProps: r,
|
|
143
143
|
component: n.component,
|
|
144
144
|
selectWrapRef: P,
|
|
@@ -157,11 +157,11 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
157
157
|
},
|
|
158
158
|
{ immediate: !0 }
|
|
159
159
|
);
|
|
160
|
-
const N =
|
|
160
|
+
const N = i(() => {
|
|
161
161
|
var e;
|
|
162
162
|
return le.value || n.disabled || ((e = r.value) == null ? void 0 : e.disabled);
|
|
163
|
-
}), W =
|
|
164
|
-
const e =
|
|
163
|
+
}), W = i(() => $(n.renderComponentContent) ? n.renderComponentContent(S.value, j) : {}), ue = i(() => Object.keys(W.value)), se = i(() => {
|
|
164
|
+
const e = ie.value;
|
|
165
165
|
return {
|
|
166
166
|
keepValue: !0,
|
|
167
167
|
label: y(n.label) ? n.label : "",
|
|
@@ -171,22 +171,22 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
171
171
|
});
|
|
172
172
|
function me(e) {
|
|
173
173
|
var v;
|
|
174
|
-
const t = e.componentField.modelValue, o = e.componentField["onUpdate:modelValue"],
|
|
174
|
+
const t = e.componentField.modelValue, o = e.componentField["onUpdate:modelValue"], a = n.modelPropName || (y(n.component) ? (v = X.value) == null ? void 0 : v[n.component] : null);
|
|
175
175
|
let m = t;
|
|
176
|
-
if (t && Ie(t) &&
|
|
176
|
+
if (t && Ie(t) && a) {
|
|
177
177
|
const d = t.target;
|
|
178
|
-
m = Q(t) ? d == null ? void 0 : d[
|
|
178
|
+
m = Q(t) ? d == null ? void 0 : d[a] : (t == null ? void 0 : t[a]) ?? t;
|
|
179
179
|
}
|
|
180
|
-
return
|
|
181
|
-
[`onUpdate:${
|
|
182
|
-
[
|
|
180
|
+
return a ? {
|
|
181
|
+
[`onUpdate:${a}`]: o,
|
|
182
|
+
[a]: m === void 0 ? n.emptyStateValue : m,
|
|
183
183
|
onChange: n.disabledOnChangeListener ? void 0 : (d) => {
|
|
184
184
|
var x;
|
|
185
185
|
const pe = Q(d), g = (x = e == null ? void 0 : e.componentField) == null ? void 0 : x.onChange;
|
|
186
186
|
if (!pe)
|
|
187
187
|
return g == null ? void 0 : g(d);
|
|
188
188
|
const I = d.target;
|
|
189
|
-
return g == null ? void 0 : g((I == null ? void 0 : I[
|
|
189
|
+
return g == null ? void 0 : g((I == null ? void 0 : I[a]) ?? d);
|
|
190
190
|
},
|
|
191
191
|
...n.disabledOnInputListener ? { onInput: void 0 } : {}
|
|
192
192
|
} : {
|
|
@@ -223,10 +223,10 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
223
223
|
default: b((o) => [
|
|
224
224
|
Fe(F(l(Ve), k({
|
|
225
225
|
class: [{
|
|
226
|
-
"form-valid-error":
|
|
226
|
+
"form-valid-error": R.value,
|
|
227
227
|
"form-is-required": V.value,
|
|
228
|
-
"pb-(--form-valid-error-nocompact-padding-bottom)": !
|
|
229
|
-
"pb-2":
|
|
228
|
+
"pb-(--form-valid-error-nocompact-padding-bottom)": !w.value,
|
|
229
|
+
"pb-2": w.value
|
|
230
230
|
}, "relative"]
|
|
231
231
|
}, e.$attrs), {
|
|
232
232
|
default: b(() => [
|
|
@@ -249,7 +249,7 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
249
249
|
colon: e.colon,
|
|
250
250
|
label: e.label,
|
|
251
251
|
required: V.value && !e.hideRequiredMark,
|
|
252
|
-
style: J(
|
|
252
|
+
style: J(ae.value),
|
|
253
253
|
"tool-tip": e.toolTip,
|
|
254
254
|
"help-trigger": e.helpTrigger,
|
|
255
255
|
form: B,
|
|
@@ -273,11 +273,11 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
273
273
|
class: O(l(q)(e.controlClass))
|
|
274
274
|
}, {
|
|
275
275
|
default: b(() => [
|
|
276
|
-
|
|
276
|
+
we(e.$slots, "default", Re(Se({
|
|
277
277
|
...o,
|
|
278
278
|
...z(o),
|
|
279
279
|
disabled: N.value,
|
|
280
|
-
isInValid:
|
|
280
|
+
isInValid: R.value,
|
|
281
281
|
form: B,
|
|
282
282
|
fieldName: e.fieldName
|
|
283
283
|
})), () => [
|
|
@@ -287,15 +287,15 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
287
287
|
}, {
|
|
288
288
|
...z(o),
|
|
289
289
|
disabled: N.value,
|
|
290
|
-
isInValid:
|
|
290
|
+
isInValid: R.value,
|
|
291
291
|
form: B,
|
|
292
292
|
fieldName: e.fieldName
|
|
293
293
|
}, { disabled: N.value }), ke({ _: 2 }, [
|
|
294
|
-
Oe(ue.value, (
|
|
295
|
-
name:
|
|
294
|
+
Oe(ue.value, (a) => ({
|
|
295
|
+
name: a,
|
|
296
296
|
fn: b((m) => [
|
|
297
297
|
F(l(E), k({
|
|
298
|
-
content: W.value[
|
|
298
|
+
content: W.value[a]
|
|
299
299
|
}, { ...m, formContext: o }), null, 16, ["content"])
|
|
300
300
|
])
|
|
301
301
|
}))
|
|
@@ -307,14 +307,14 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
307
307
|
e.suffix ? (u(), H("div", Ye, [
|
|
308
308
|
F(l(E), { content: e.suffix }, null, 8, ["content"])
|
|
309
309
|
])) : c("", !0),
|
|
310
|
-
|
|
310
|
+
w.value && R.value ? (u(), h(l(qe), {
|
|
311
311
|
key: 1,
|
|
312
312
|
"ref-dom": P.value
|
|
313
313
|
}, null, 8, ["ref-dom"])) : c("", !0)
|
|
314
314
|
], 2)
|
|
315
315
|
])
|
|
316
316
|
], 2),
|
|
317
|
-
e.description || !
|
|
317
|
+
e.description || !w.value ? (u(), H("div", {
|
|
318
318
|
key: 0,
|
|
319
319
|
style: J(!l(C) && !e.hideLabel ? { paddingLeft: `${(e.labelWidth || 0) + 8}px` } : {})
|
|
320
320
|
}, [
|
|
@@ -329,7 +329,7 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
329
329
|
})) : c("", !0),
|
|
330
330
|
F(Ee, { name: "slide-up" }, {
|
|
331
331
|
default: b(() => [
|
|
332
|
-
!
|
|
332
|
+
!w.value && R.value ? (u(), h(l(je), {
|
|
333
333
|
key: 0,
|
|
334
334
|
class: "absolute"
|
|
335
335
|
})) : c("", !0)
|
|
@@ -4,36 +4,36 @@ import { FieldEntry } from '../../types/forms';
|
|
|
4
4
|
export declare const FormArrayRegister: import('vue').DefineComponent<{
|
|
5
5
|
disabled?: boolean | undefined;
|
|
6
6
|
hide?: boolean | undefined;
|
|
7
|
+
rules?: import('../../types').FormSchemaRuleType | undefined;
|
|
7
8
|
defaultValue?: any;
|
|
8
9
|
wrapperClass?: string | undefined;
|
|
9
10
|
arraySchema?: FormSchema<Record<string, any>>[] | ((entry: FieldEntry<Recordable>, currentIndex: number, ctx: ArraySchemaContext) => FormSchema<Record<string, any>>[]) | undefined;
|
|
10
11
|
dependencies?: import('./types').ArrayRegisterDependencies<Record<string, any>> | undefined;
|
|
11
12
|
fieldName: string;
|
|
12
|
-
rules?: import('../../types').FormSchemaRuleType | undefined;
|
|
13
13
|
formItemClass?: (() => string) | string | undefined;
|
|
14
14
|
virtual?: boolean | undefined;
|
|
15
15
|
progressive?: boolean | undefined;
|
|
16
16
|
}, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
17
17
|
disabled?: boolean | undefined;
|
|
18
18
|
hide?: boolean | undefined;
|
|
19
|
+
rules?: import('../../types').FormSchemaRuleType | undefined;
|
|
19
20
|
defaultValue?: any;
|
|
20
21
|
wrapperClass?: string | undefined;
|
|
21
22
|
arraySchema?: FormSchema<Record<string, any>>[] | ((entry: FieldEntry<Recordable>, currentIndex: number, ctx: ArraySchemaContext) => FormSchema<Record<string, any>>[]) | undefined;
|
|
22
23
|
dependencies?: import('./types').ArrayRegisterDependencies<Record<string, any>> | undefined;
|
|
23
24
|
fieldName: string;
|
|
24
|
-
rules?: import('../../types').FormSchemaRuleType | undefined;
|
|
25
25
|
formItemClass?: (() => string) | string | undefined;
|
|
26
26
|
virtual?: boolean | undefined;
|
|
27
27
|
progressive?: boolean | undefined;
|
|
28
28
|
}> & Readonly<{}>, {
|
|
29
29
|
readonly disabled: boolean | undefined;
|
|
30
30
|
readonly hide: boolean | undefined;
|
|
31
|
+
readonly rules: import('../../types').FormSchemaRuleType | undefined;
|
|
31
32
|
readonly defaultValue: any;
|
|
32
33
|
readonly wrapperClass: string;
|
|
33
34
|
readonly useArraySchema: boolean | undefined;
|
|
34
35
|
readonly arraySchema: import('./props').ArraySchemaProp;
|
|
35
36
|
readonly dependencies: import('./types').ArrayRegisterDependencies | undefined;
|
|
36
|
-
readonly rules: import('../../types').FormSchemaRuleType | undefined;
|
|
37
37
|
readonly formItemClass: NonNullable<string | (() => string) | undefined>;
|
|
38
38
|
readonly virtual: boolean;
|
|
39
39
|
readonly progressive: boolean;
|
|
@@ -40,7 +40,9 @@ const se = ["fieldName", "arraySchema", "useArraySchema", "useFieldArray", "rule
|
|
|
40
40
|
return J(y.value, a);
|
|
41
41
|
},
|
|
42
42
|
set(e, a, t) {
|
|
43
|
-
return q(y.value, a, t), N == null || N.validateField(String(a)
|
|
43
|
+
return q(y.value, a, t), N == null || N.validateField(String(a), {
|
|
44
|
+
warn: !1
|
|
45
|
+
}), !0;
|
|
44
46
|
},
|
|
45
47
|
ownKeys() {
|
|
46
48
|
return Reflect.ownKeys(y.value);
|
|
@@ -2,7 +2,7 @@ import o from "./index.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d731bb93"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./loading.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7e6228e4"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as H, useSlots as J, ref as K, computed as C, toValue as Q, nextTick as y, watch as W, createBlock as M, openBlock as B, unref as d, createSlots as P, withCtx as A, renderSlot as h, createVNode as X, renderList as S, normalizeProps as b, guardReactiveProps as V, createCommentVNode as Y } from "vue";
|
|
2
2
|
import "axios";
|
|
3
3
|
import { ElCheckbox as Z, ElMessage as O } from "element-plus";
|
|
4
|
-
import { isFunction as
|
|
4
|
+
import { isFunction as m } from "../../packages/utils/src/is.js";
|
|
5
5
|
import "xe-utils";
|
|
6
6
|
import "dayjs";
|
|
7
7
|
import "dayjs/plugin/utc";
|
|
@@ -19,6 +19,7 @@ import "../tt-panel-select/index.js";
|
|
|
19
19
|
import "../tt-upload/index.js";
|
|
20
20
|
import "../tt-api-component/index.js";
|
|
21
21
|
import "vee-validate";
|
|
22
|
+
import "../../utils/uppercaseInput.js";
|
|
22
23
|
import { useForm as oe } from "../tt-form/src/useForm.js";
|
|
23
24
|
import "zod";
|
|
24
25
|
import "@vee-validate/zod";
|
|
@@ -29,7 +30,7 @@ import { useGroupForm as te } from "../tt-form/src/group-form/useGroupForm.js";
|
|
|
29
30
|
import "../tt-modal/index.js";
|
|
30
31
|
import { useModalFormSlot as ie } from "./hooks/useModalFormSlot.js";
|
|
31
32
|
import { useModalRender as ne } from "../tt-modal/src/hooks/useModalRender.js";
|
|
32
|
-
const
|
|
33
|
+
const Re = /* @__PURE__ */ H({
|
|
33
34
|
name: "TtModalForm",
|
|
34
35
|
__name: "index",
|
|
35
36
|
props: {
|
|
@@ -56,7 +57,7 @@ const Ee = /* @__PURE__ */ H({
|
|
|
56
57
|
emits: ["submit", "fetch", "getinfo"],
|
|
57
58
|
setup(I, { emit: D }) {
|
|
58
59
|
var w, F;
|
|
59
|
-
const o = I,
|
|
60
|
+
const o = I, c = D, L = J(), f = K(), r = K(!1), { getFormSlotKeys: T, getModalSlotKeys: E, replaceFormSlotKey: R, replaceModalSlotKey: _ } = ie(L), x = C(() => E.value.filter(Boolean)), $ = C(() => T.value.filter(Boolean)), v = {
|
|
60
61
|
showDefaultActions: !1,
|
|
61
62
|
...Q(o.formProps)
|
|
62
63
|
}, [z, s] = o.renderType === "groupForm" ? te(v) : oe(v), [N, a] = ne({
|
|
@@ -68,7 +69,7 @@ const Ee = /* @__PURE__ */ H({
|
|
|
68
69
|
}
|
|
69
70
|
if (e.schemas && s.setState({ schema: e.schemas }), e != null && e.title && a.setModalProps({ title: e.title }), f.value = e[o.infoApiIdKey], e != null && e[o.infoApiIdKey]) {
|
|
70
71
|
const i = o.infoApi;
|
|
71
|
-
if (!
|
|
72
|
+
if (!m(i)) {
|
|
72
73
|
g(e);
|
|
73
74
|
return;
|
|
74
75
|
}
|
|
@@ -77,8 +78,8 @@ const Ee = /* @__PURE__ */ H({
|
|
|
77
78
|
const t = {
|
|
78
79
|
...o.infoApiParams,
|
|
79
80
|
[o.infoApiIdKey]: e[o.infoApiIdKey]
|
|
80
|
-
}, n =
|
|
81
|
-
k(u),
|
|
81
|
+
}, n = m(o.infoApiBefore) ? await o.infoApiBefore(t) : t, l = await i(n), p = o.dataField ? ee(l, o.dataField) : l, u = m(o.infoApiAfter) ? await o.infoApiAfter(p) : p;
|
|
82
|
+
k(u), c("getinfo", u), await y(), await s.resetForm({ values: u });
|
|
82
83
|
} finally {
|
|
83
84
|
a.changeLoading(!1);
|
|
84
85
|
}
|
|
@@ -115,18 +116,18 @@ const Ee = /* @__PURE__ */ H({
|
|
|
115
116
|
...e,
|
|
116
117
|
...i
|
|
117
118
|
};
|
|
118
|
-
return t =
|
|
119
|
+
return t = m(o.saveApiBefore) ? await o.saveApiBefore(t) : t, { reqParams: t, formValue: e };
|
|
119
120
|
}
|
|
120
121
|
async function G(e, i) {
|
|
121
122
|
const { editApi: t } = o;
|
|
122
|
-
!t || !
|
|
123
|
+
!t || !m(t) || (e[o.infoApiIdKey] = f.value, await t(e, i.files), O.success("修改成功"), c("submit", {
|
|
123
124
|
...e,
|
|
124
125
|
continuousChecked: r.value
|
|
125
126
|
}), a.closeModal());
|
|
126
127
|
}
|
|
127
128
|
async function U(e, i) {
|
|
128
129
|
const { addApi: t } = o;
|
|
129
|
-
!t || !
|
|
130
|
+
!t || !m(t) || (await t(e, i.files), O.success("新增成功"), c("submit", {
|
|
130
131
|
...e,
|
|
131
132
|
continuousChecked: r.value
|
|
132
133
|
}), (!r.value || !o.isContinuousChecked) && a.closeModal());
|
|
@@ -141,7 +142,7 @@ const Ee = /* @__PURE__ */ H({
|
|
|
141
142
|
return;
|
|
142
143
|
const { addApi: n, editApi: l } = o;
|
|
143
144
|
if (!n && !l) {
|
|
144
|
-
|
|
145
|
+
c("submit", {
|
|
145
146
|
...i,
|
|
146
147
|
[o.infoApiIdKey]: f.value,
|
|
147
148
|
continuousChecked: r.value
|
|
@@ -162,7 +163,7 @@ const Ee = /* @__PURE__ */ H({
|
|
|
162
163
|
if (e) {
|
|
163
164
|
await y();
|
|
164
165
|
const i = await s.getValues();
|
|
165
|
-
|
|
166
|
+
c("fetch", i);
|
|
166
167
|
} else
|
|
167
168
|
r.value = !1;
|
|
168
169
|
}
|
|
@@ -199,5 +200,5 @@ const Ee = /* @__PURE__ */ H({
|
|
|
199
200
|
}
|
|
200
201
|
});
|
|
201
202
|
export {
|
|
202
|
-
|
|
203
|
+
Re as default
|
|
203
204
|
};
|
|
@@ -157,7 +157,7 @@ declare const _default: import('vue').DefineComponent<PanelMiddleProps, {
|
|
|
157
157
|
};
|
|
158
158
|
$forceUpdate: () => void;
|
|
159
159
|
$nextTick: typeof nextTick;
|
|
160
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...
|
|
160
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
161
161
|
} & Readonly<{
|
|
162
162
|
type: import('element-plus').InputType;
|
|
163
163
|
disabled: boolean;
|
|
@@ -307,7 +307,7 @@ declare const _default: import('vue').DefineComponent<PanelMiddleProps, {
|
|
|
307
307
|
};
|
|
308
308
|
$forceUpdate: () => void;
|
|
309
309
|
$nextTick: typeof nextTick;
|
|
310
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...
|
|
310
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
311
311
|
} & Readonly<{
|
|
312
312
|
tabindex: number | string;
|
|
313
313
|
height: number | string;
|