@dazhicheng/ui 1.6.0 → 1.6.2
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.js +4 -3
- package/dist/components/tt-api-component/index.vue2.js +4 -3
- package/dist/components/tt-area/TtArea.vue3.js +8 -7
- package/dist/components/tt-button/index.js +5 -4
- package/dist/components/tt-button/index.vue2.js +4 -3
- package/dist/components/tt-checkbox/index.js +4 -3
- package/dist/components/tt-checkbox/index.vue.js +4 -3
- package/dist/components/tt-drawer/index.js +4 -3
- package/dist/components/tt-drawer/src/RenderDrawer.vue.js +4 -3
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +8 -7
- 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-drawer/src/utils/drawer-api.js +4 -2
- package/dist/components/tt-empty/index.js +9 -8
- package/dist/components/tt-form/index.js +10 -9
- package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +3 -2
- package/dist/components/tt-form/src/components/FormActions.vue2.js +4 -2
- package/dist/components/tt-form/src/form/FormDescription.vue.js +3 -2
- package/dist/components/tt-form/src/form/FormItem.vue.js +6 -5
- package/dist/components/tt-form/src/form/FormLabel.vue.js +8 -7
- package/dist/components/tt-form/src/form/RenderContent.vue.js +4 -3
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +30 -28
- package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +4 -2
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +1 -0
- package/dist/components/tt-form/src/form-render/array-register/utils.js +6 -4
- package/dist/components/tt-form/src/form-render/dependencies.js +19 -18
- package/dist/components/tt-form/src/form-render/form.vue2.js +4 -2
- package/dist/components/tt-form/src/form-render/helper.js +15 -14
- package/dist/components/tt-form/src/form-render/rootWrapperClass.js +3 -2
- package/dist/components/tt-form/src/formApi.js +3 -2
- package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +4 -3
- package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +2 -0
- package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +4 -2
- package/dist/components/tt-form/src/group-form/groupFormApi.js +4 -3
- package/dist/components/tt-form/src/hooks/useForwardPriorityValues.js +3 -2
- package/dist/components/tt-form/src/hooks/useSelectCollapse.js +28 -27
- package/dist/components/tt-form/src/index.vue2.js +3 -2
- package/dist/components/tt-form/src/useFormContext.js +11 -10
- package/dist/components/tt-form-item-error-tooltip/index.js +5 -4
- package/dist/components/tt-form-item-error-tooltip/index.vue.js +4 -3
- package/dist/components/tt-icon/index.js +6 -5
- package/dist/components/tt-image/index.js +6 -5
- package/dist/components/tt-image/src/components/ImageViewer.js +7 -6
- package/dist/components/tt-loading/index.js +4 -3
- package/dist/components/tt-loading/src/directive.js +24 -23
- package/dist/components/tt-log/index.js +4 -3
- package/dist/components/tt-log/index.vue.js +3 -2
- package/dist/components/tt-modal/index.js +3 -2
- package/dist/components/tt-modal/src/RenderModal.vue.js +3 -2
- package/dist/components/tt-modal/src/components/ModalFooter.vue2.js +3 -2
- package/dist/components/tt-modal/src/components/ModalHeader.vue2.js +3 -2
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +15 -14
- package/dist/components/tt-modal/src/props.js +3 -2
- package/dist/components/tt-modal/src/utils/modal-api.js +4 -2
- package/dist/components/tt-modal-form/index.vue.js +4 -3
- package/dist/components/tt-nav-anchor/index.js +4 -3
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +15 -14
- package/dist/components/tt-panel-select/index.js +4 -3
- package/dist/components/tt-panel-select/src/hooks/usePanelData.js +4 -3
- package/dist/components/tt-panel-select/src/index.vue.js +3 -2
- package/dist/components/tt-radio-group/index.js +4 -3
- package/dist/components/tt-radio-group/index.vue.js +7 -6
- package/dist/components/tt-select/index.js +4 -3
- package/dist/components/tt-select/src/Select.vue.d.ts +8 -8
- package/dist/components/tt-select/src/Select.vue.js +4 -3
- package/dist/components/tt-select/src/components/SelectTable.vue.d.ts +116 -7
- package/dist/components/tt-select/src/components/SelectTable.vue.js +3 -2
- package/dist/components/tt-select/src/components/Table.vue.d.ts +4 -4
- package/dist/components/tt-select/src/components/Table.vue.js +3 -2
- package/dist/components/tt-select/src/hooks/useDataSource.js +4 -3
- package/dist/components/tt-select/src/hooks/useKeyboard.d.ts +7 -1
- package/dist/components/tt-select/src/hooks/useSelect.js +3 -2
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.d.ts +1 -1
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.js +28 -27
- package/dist/components/tt-select/src/props.d.ts +2 -2
- package/dist/components/tt-table/index.d.ts +6 -6
- package/dist/components/tt-table/index.js +1 -1
- package/dist/components/tt-table/src/Table.vue.d.ts +4 -4
- package/dist/components/tt-table/src/Table.vue.js +178 -175
- package/dist/components/tt-table/src/TableForm.vue.d.ts +6 -6
- package/dist/components/tt-table/src/TableForm.vue.js +2 -2
- package/dist/components/tt-table/src/components/TableAction.vue.js +19 -17
- package/dist/components/tt-table/src/components/TableButtons.js +10 -9
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +4 -3
- package/dist/components/tt-table/src/components/TableToolbarTools.vue.js +18 -17
- package/dist/components/tt-table/src/emits.d.ts +10 -1
- package/dist/components/tt-table/src/hooks/useColumnPersistence.js +17 -16
- package/dist/components/tt-table/src/hooks/useColumns.js +4 -3
- package/dist/components/tt-table/src/hooks/useKeyboardNav.js +34 -33
- package/dist/components/tt-table/src/hooks/usePagination.js +12 -11
- package/dist/components/tt-table/src/hooks/useQuery.js +6 -5
- package/dist/components/tt-table/src/hooks/useRowIdentity.d.ts +1 -0
- package/dist/components/tt-table/src/hooks/useRowIdentity.js +68 -54
- package/dist/components/tt-table/src/hooks/useRowSelection.d.ts +5 -7
- package/dist/components/tt-table/src/hooks/useRowSelection.js +70 -68
- package/dist/components/tt-table/src/hooks/useSideSlot.js +4 -3
- package/dist/components/tt-table/src/hooks/useSyncProps.js +4 -3
- package/dist/components/tt-table/src/hooks/useTableData.js +6 -5
- package/dist/components/tt-table/src/hooks/useTableFooter.js +9 -8
- package/dist/components/tt-table/src/hooks/useTableForm.js +4 -3
- package/dist/components/tt-table/src/hooks/useTableRender.d.ts +37 -4
- package/dist/components/tt-table/src/props.d.ts +12 -6
- package/dist/components/tt-table/src/props.js +14 -7
- package/dist/components/tt-table/src/table-mutation-events.js +10 -9
- package/dist/components/tt-table/src/types/table.d.ts +16 -0
- package/dist/components/tt-table/src/utils/action-tab-index.js +15 -14
- package/dist/components/tt-table/src/utils/context.js +5 -4
- package/dist/components/tt-table/src/utils/table-api.js +4 -2
- package/dist/components/tt-table/src/utils/table-form-api.js +22 -20
- package/dist/components/tt-text/index.js +4 -3
- package/dist/components/tt-upload/index.js +6 -5
- package/dist/components/tt-upload/src/TtUpload.vue.js +4 -3
- package/dist/directives/disabled-tip/index.js +9 -8
- package/dist/hooks/useFormSchemasLink.js +4 -3
- package/dist/hooks/useFormat.d.ts +35 -71
- package/dist/hooks/useFormat.js +28 -39
- package/dist/hooks/usePanelSelectSchemas.js +4 -3
- package/dist/hooks/useScreenshotOss.js +16 -15
- package/dist/packages/hooks/src/useDebounce.js +5 -4
- package/dist/packages/hooks/src/useElementScreenshot.js +4 -3
- package/dist/packages/hooks/src/usePriorityValue.js +5 -4
- package/dist/packages/utils/src/format.js +48 -0
- package/dist/plugins/default/renderCellContent.js +4 -3
- package/dist/plugins/vxeTable/switchStatus.js +14 -13
- package/package.json +3 -3
|
@@ -1,10 +1,12 @@
|
|
|
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 a, 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";
|
|
5
5
|
import "axios";
|
|
6
6
|
import "element-plus";
|
|
7
7
|
import { isString as y, isFunction as $, isObject as Ie } from "../../../../packages/utils/src/is.js";
|
|
8
|
+
import "dayjs";
|
|
9
|
+
import "numeral";
|
|
8
10
|
import { clnm as q } from "../../../../packages/utils/src/tool.js";
|
|
9
11
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
10
12
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
@@ -29,7 +31,7 @@ import { isEventObjectLike as Q } from "./helper.js";
|
|
|
29
31
|
const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
30
32
|
key: 0,
|
|
31
33
|
class: "ml-1"
|
|
32
|
-
},
|
|
34
|
+
}, Pn = /* @__PURE__ */ ve({
|
|
33
35
|
__name: "FormField",
|
|
34
36
|
props: {
|
|
35
37
|
component: {},
|
|
@@ -66,7 +68,7 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
66
68
|
commonComponentProps: {}
|
|
67
69
|
},
|
|
68
70
|
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, w =
|
|
71
|
+
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 = a(() => Z.compact), R = a(() => {
|
|
70
72
|
var e;
|
|
71
73
|
return ((e = _.value) == null ? void 0 : e.length) > 0;
|
|
72
74
|
}), B = he(
|
|
@@ -89,18 +91,18 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
89
91
|
return Le(S.value, t, o), ne.validateField(t, { warn: !1 }), !0;
|
|
90
92
|
}
|
|
91
93
|
})
|
|
92
|
-
), A =
|
|
94
|
+
), A = a(() => {
|
|
93
95
|
const e = y(n.component) ? Y.value[n.component] : n.component;
|
|
94
96
|
return be(ye(e));
|
|
95
97
|
}), { dynamicComponentProps: te, dynamicRules: oe, isDisabled: le, isIf: M, isRequired: T, isShow: U } = Ge(
|
|
96
98
|
() => n.dependencies
|
|
97
|
-
),
|
|
99
|
+
), ie = a(() => {
|
|
98
100
|
var e;
|
|
99
101
|
return (e = n.labelClass) != null && e.includes("w-") || C.value ? {} : {
|
|
100
102
|
width: `${n.labelWidth}px`
|
|
101
103
|
};
|
|
102
|
-
}), s =
|
|
103
|
-
var o,
|
|
104
|
+
}), s = a(() => oe.value || n.rules), D = a(() => !n.hide && M.value && U.value), V = a(() => {
|
|
105
|
+
var o, i, m;
|
|
104
106
|
if (!D.value)
|
|
105
107
|
return !1;
|
|
106
108
|
if (!s.value)
|
|
@@ -109,14 +111,14 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
109
111
|
return !0;
|
|
110
112
|
if (y(s.value))
|
|
111
113
|
return ["required", "selectRequired"].includes(s.value);
|
|
112
|
-
let e = (
|
|
114
|
+
let e = (i = (o = s == null ? void 0 : s.value) == null ? void 0 : o.isOptional) == null ? void 0 : i.call(o);
|
|
113
115
|
const t = s.value.def;
|
|
114
116
|
if ((t == null ? void 0 : t.type) === "default" && "innerType" in t) {
|
|
115
117
|
const v = t.innerType;
|
|
116
118
|
v && (e = (m = v.isOptional) == null ? void 0 : m.call(v));
|
|
117
119
|
}
|
|
118
120
|
return !e;
|
|
119
|
-
}),
|
|
121
|
+
}), ae = a(() => {
|
|
120
122
|
var o;
|
|
121
123
|
if (!D.value)
|
|
122
124
|
return null;
|
|
@@ -126,11 +128,11 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
126
128
|
if (y(e))
|
|
127
129
|
return e;
|
|
128
130
|
if (!!V.value) {
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
+
const i = (o = e == null ? void 0 : e.unwrap) == null ? void 0 : o.call(e);
|
|
132
|
+
i && (e = i);
|
|
131
133
|
}
|
|
132
134
|
return De(e);
|
|
133
|
-
}), r =
|
|
135
|
+
}), r = a(() => {
|
|
134
136
|
const e = $(n.componentProps) ? n.componentProps(S.value, j) : n.componentProps;
|
|
135
137
|
return {
|
|
136
138
|
...n.commonComponentProps,
|
|
@@ -138,7 +140,7 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
138
140
|
...te.value
|
|
139
141
|
};
|
|
140
142
|
}), { selectComponentProps: re } = Qe(
|
|
141
|
-
|
|
143
|
+
a(() => ({
|
|
142
144
|
componentProps: r,
|
|
143
145
|
component: n.component,
|
|
144
146
|
selectWrapRef: P,
|
|
@@ -157,11 +159,11 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
157
159
|
},
|
|
158
160
|
{ immediate: !0 }
|
|
159
161
|
);
|
|
160
|
-
const N =
|
|
162
|
+
const N = a(() => {
|
|
161
163
|
var e;
|
|
162
164
|
return le.value || n.disabled || ((e = r.value) == null ? void 0 : e.disabled);
|
|
163
|
-
}), W =
|
|
164
|
-
const e =
|
|
165
|
+
}), W = a(() => $(n.renderComponentContent) ? n.renderComponentContent(S.value, j) : {}), ue = a(() => Object.keys(W.value)), se = a(() => {
|
|
166
|
+
const e = ae.value;
|
|
165
167
|
return {
|
|
166
168
|
keepValue: !0,
|
|
167
169
|
label: y(n.label) ? n.label : "",
|
|
@@ -171,22 +173,22 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
171
173
|
});
|
|
172
174
|
function me(e) {
|
|
173
175
|
var v;
|
|
174
|
-
const t = e.componentField.modelValue, o = e.componentField["onUpdate:modelValue"],
|
|
176
|
+
const t = e.componentField.modelValue, o = e.componentField["onUpdate:modelValue"], i = n.modelPropName || (y(n.component) ? (v = X.value) == null ? void 0 : v[n.component] : null);
|
|
175
177
|
let m = t;
|
|
176
|
-
if (t && Ie(t) &&
|
|
178
|
+
if (t && Ie(t) && i) {
|
|
177
179
|
const d = t.target;
|
|
178
|
-
m = Q(t) ? d == null ? void 0 : d[
|
|
180
|
+
m = Q(t) ? d == null ? void 0 : d[i] : (t == null ? void 0 : t[i]) ?? t;
|
|
179
181
|
}
|
|
180
|
-
return
|
|
181
|
-
[`onUpdate:${
|
|
182
|
-
[
|
|
182
|
+
return i ? {
|
|
183
|
+
[`onUpdate:${i}`]: o,
|
|
184
|
+
[i]: m === void 0 ? n.emptyStateValue : m,
|
|
183
185
|
onChange: n.disabledOnChangeListener ? void 0 : (d) => {
|
|
184
186
|
var x;
|
|
185
187
|
const pe = Q(d), g = (x = e == null ? void 0 : e.componentField) == null ? void 0 : x.onChange;
|
|
186
188
|
if (!pe)
|
|
187
189
|
return g == null ? void 0 : g(d);
|
|
188
190
|
const I = d.target;
|
|
189
|
-
return g == null ? void 0 : g((I == null ? void 0 : I[
|
|
191
|
+
return g == null ? void 0 : g((I == null ? void 0 : I[i]) ?? d);
|
|
190
192
|
},
|
|
191
193
|
...n.disabledOnInputListener ? { onInput: void 0 } : {}
|
|
192
194
|
} : {
|
|
@@ -249,7 +251,7 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
249
251
|
colon: e.colon,
|
|
250
252
|
label: e.label,
|
|
251
253
|
required: V.value && !e.hideRequiredMark,
|
|
252
|
-
style: J(
|
|
254
|
+
style: J(ie.value),
|
|
253
255
|
"tool-tip": e.toolTip,
|
|
254
256
|
"help-trigger": e.helpTrigger,
|
|
255
257
|
form: B,
|
|
@@ -291,11 +293,11 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
291
293
|
form: B,
|
|
292
294
|
fieldName: e.fieldName
|
|
293
295
|
}, { disabled: N.value }), ke({ _: 2 }, [
|
|
294
|
-
Oe(ue.value, (
|
|
295
|
-
name:
|
|
296
|
+
Oe(ue.value, (i) => ({
|
|
297
|
+
name: i,
|
|
296
298
|
fn: b((m) => [
|
|
297
299
|
F(l(E), k({
|
|
298
|
-
content: W.value[
|
|
300
|
+
content: W.value[i]
|
|
299
301
|
}, { ...m, formContext: o }), null, 16, ["content"])
|
|
300
302
|
])
|
|
301
303
|
}))
|
|
@@ -348,5 +350,5 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
348
350
|
}
|
|
349
351
|
});
|
|
350
352
|
export {
|
|
351
|
-
|
|
353
|
+
Pn as default
|
|
352
354
|
};
|
|
@@ -5,6 +5,8 @@ import { TtText as x } from "../../../tt-text/index.js";
|
|
|
5
5
|
import "axios";
|
|
6
6
|
import { ElTooltip as d } from "element-plus";
|
|
7
7
|
import { isObject as B, isFunction as C } from "../../../../packages/utils/src/is.js";
|
|
8
|
+
import "dayjs";
|
|
9
|
+
import "numeral";
|
|
8
10
|
import { clnm as V } from "../../../../packages/utils/src/tool.js";
|
|
9
11
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
10
12
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
@@ -25,7 +27,7 @@ const N = {
|
|
|
25
27
|
}, E = { class: "flex items-center" }, F = { key: 0 }, q = { class: "flex items-center" }, L = {
|
|
26
28
|
key: 3,
|
|
27
29
|
class: "ml-[2px]"
|
|
28
|
-
},
|
|
30
|
+
}, re = /* @__PURE__ */ h({
|
|
29
31
|
__name: "FormLabel",
|
|
30
32
|
props: {
|
|
31
33
|
class: {},
|
|
@@ -105,5 +107,5 @@ const N = {
|
|
|
105
107
|
}
|
|
106
108
|
});
|
|
107
109
|
export {
|
|
108
|
-
|
|
110
|
+
re as default
|
|
109
111
|
};
|
|
@@ -2,6 +2,7 @@ import { defineComponent as M, computed as h, unref as C, reactive as T, onMount
|
|
|
2
2
|
import "axios";
|
|
3
3
|
import "element-plus";
|
|
4
4
|
import "dayjs";
|
|
5
|
+
import "numeral";
|
|
5
6
|
import { clnm as W } from "../../../../../packages/utils/src/tool.js";
|
|
6
7
|
import "../../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
7
8
|
import "../../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
@@ -2,6 +2,8 @@ import "axios";
|
|
|
2
2
|
import "element-plus";
|
|
3
3
|
import { isFunction as a } from "../../../../../packages/utils/src/is.js";
|
|
4
4
|
import "vue";
|
|
5
|
+
import "dayjs";
|
|
6
|
+
import "numeral";
|
|
5
7
|
import { clnm as d } from "../../../../../packages/utils/src/tool.js";
|
|
6
8
|
import "../../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
7
9
|
import "../../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
@@ -12,11 +14,11 @@ import "lodash-es";
|
|
|
12
14
|
function c(r, t, o) {
|
|
13
15
|
return r || !!t || !!o;
|
|
14
16
|
}
|
|
15
|
-
function
|
|
16
|
-
const { dynamicRules: o, dynamicDisabled:
|
|
17
|
-
return { rules:
|
|
17
|
+
function M(r, t) {
|
|
18
|
+
const { dynamicRules: o, dynamicDisabled: m, props: s } = t, e = r.rules ?? o ?? s.rules, i = r.formItemClass || s.formItemClass, p = a(i) ? i() : i, l = r.wrapperClass, n = c(m, !!r.disabled, !!s.disabled);
|
|
19
|
+
return { rules: e, formItemClass: d("col-span-1", p), disabled: n, wrapperClass: l };
|
|
18
20
|
}
|
|
19
21
|
export {
|
|
20
22
|
c as getMergedDisabled,
|
|
21
|
-
|
|
23
|
+
M as resolveArrayItemState
|
|
22
24
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { unref as V, ref as n, computed as N, watch as k } from "vue";
|
|
2
2
|
import "axios";
|
|
3
3
|
import "element-plus";
|
|
4
|
-
import { isFunction as
|
|
5
|
-
import "xe-utils";
|
|
4
|
+
import { isFunction as o, isBoolean as E, isString as S } from "../../../../packages/utils/src/is.js";
|
|
6
5
|
import "dayjs";
|
|
6
|
+
import "numeral";
|
|
7
|
+
import "xe-utils";
|
|
7
8
|
import "dayjs/plugin/utc";
|
|
8
9
|
import "dayjs/plugin/timezone";
|
|
9
10
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
@@ -16,7 +17,7 @@ import { get as A } from "es-toolkit/compat";
|
|
|
16
17
|
import { useFormValues as B } from "vee-validate";
|
|
17
18
|
import { injectFormProps as C } from "../useFormContext.js";
|
|
18
19
|
const K = /* @__PURE__ */ new Set(["ElInput", "FormElInput", "ElInputNumber", "ElInputTag", "ElMention"]);
|
|
19
|
-
function
|
|
20
|
+
function ir(r) {
|
|
20
21
|
const e = S(r) ? r : (r == null ? void 0 : r.name) ?? (r == null ? void 0 : r.__name);
|
|
21
22
|
return S(e) && K.has(e) ? "required" : "selectRequired";
|
|
22
23
|
}
|
|
@@ -27,12 +28,12 @@ function M(r, e) {
|
|
|
27
28
|
}
|
|
28
29
|
return A(r, e);
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
+
function ur(r) {
|
|
31
32
|
var x;
|
|
32
33
|
const e = B(), [w] = C(), u = V(w).formApi;
|
|
33
34
|
if (!e)
|
|
34
35
|
throw new Error("useDependencies should be used within <TtForm>");
|
|
35
|
-
const
|
|
36
|
+
const l = n(!0), f = n(!1), m = n(!0), g = n(!1), h = n({}), F = n(), _ = N(() => {
|
|
36
37
|
var i;
|
|
37
38
|
return (((i = r()) == null ? void 0 : i.triggerFields) ?? []).map((d) => M(e.value, d));
|
|
38
39
|
});
|
|
@@ -44,42 +45,42 @@ function ir(r) {
|
|
|
44
45
|
if (!i || !((R = i == null ? void 0 : i.triggerFields) != null && R.length))
|
|
45
46
|
return;
|
|
46
47
|
const d = ++I, s = () => d !== I, { componentProps: y, disabled: v, if: c, required: P, rules: T, show: p, trigger: q } = i, a = e.value;
|
|
47
|
-
if (
|
|
48
|
+
if (o(c)) {
|
|
48
49
|
const t = !!await c(a, u);
|
|
49
|
-
if (s() || (
|
|
50
|
+
if (s() || (l.value = t, !l.value)) return;
|
|
50
51
|
} else if (E(c)) {
|
|
51
|
-
if (
|
|
52
|
+
if (l.value = c, !l.value) return;
|
|
52
53
|
} else
|
|
53
|
-
|
|
54
|
-
if (
|
|
54
|
+
l.value = !0;
|
|
55
|
+
if (o(p)) {
|
|
55
56
|
const t = !!await p(a, u);
|
|
56
57
|
if (s()) return;
|
|
57
58
|
m.value = t;
|
|
58
59
|
} else E(p) ? m.value = p : m.value = !0;
|
|
59
|
-
if (
|
|
60
|
+
if (o(y)) {
|
|
60
61
|
const t = await y(a, u);
|
|
61
62
|
if (s()) return;
|
|
62
63
|
h.value = t;
|
|
63
64
|
} else
|
|
64
65
|
h.value = {};
|
|
65
|
-
if (
|
|
66
|
+
if (o(T)) {
|
|
66
67
|
const t = await T(a, u);
|
|
67
68
|
if (s()) return;
|
|
68
69
|
F.value = t;
|
|
69
70
|
} else
|
|
70
71
|
F.value = void 0;
|
|
71
|
-
if (
|
|
72
|
+
if (o(v)) {
|
|
72
73
|
const t = !!await v(a, u);
|
|
73
74
|
if (s()) return;
|
|
74
75
|
f.value = t;
|
|
75
76
|
} else E(v) ? f.value = v : f.value = !1;
|
|
76
|
-
if (
|
|
77
|
+
if (o(P)) {
|
|
77
78
|
const t = !!await P(a, u);
|
|
78
79
|
if (s()) return;
|
|
79
80
|
g.value = t;
|
|
80
81
|
} else
|
|
81
82
|
g.value = !1;
|
|
82
|
-
if (
|
|
83
|
+
if (o(q)) {
|
|
83
84
|
if (s()) return;
|
|
84
85
|
await q(a, u);
|
|
85
86
|
}
|
|
@@ -89,13 +90,13 @@ function ir(r) {
|
|
|
89
90
|
dynamicComponentProps: h,
|
|
90
91
|
dynamicRules: F,
|
|
91
92
|
isDisabled: f,
|
|
92
|
-
isIf:
|
|
93
|
+
isIf: l,
|
|
93
94
|
isRequired: g,
|
|
94
95
|
isShow: m
|
|
95
96
|
};
|
|
96
97
|
}
|
|
97
98
|
export {
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
ur as default,
|
|
100
|
+
ir as resolveRequiredRuleName,
|
|
100
101
|
M as resolveValueByFieldName
|
|
101
102
|
};
|
|
@@ -3,6 +3,8 @@ import "../components/Slot.js";
|
|
|
3
3
|
import "axios";
|
|
4
4
|
import "element-plus";
|
|
5
5
|
import { isString as ne, isFunction as ae } from "../../../../packages/utils/src/is.js";
|
|
6
|
+
import "dayjs";
|
|
7
|
+
import "numeral";
|
|
6
8
|
import { clnm as w } from "../../../../packages/utils/src/tool.js";
|
|
7
9
|
import { mergeWithArrayOverride as pe } from "../../../../packages/utils/src/merge.js";
|
|
8
10
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
@@ -25,7 +27,7 @@ import { getBaseRules as Ce, getDefaultValueInZodStack as ge } from "./helper.js
|
|
|
25
27
|
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";
|
|
26
28
|
import { useDesign as ye } from "../../../../packages/hooks/src/useDesign.js";
|
|
27
29
|
import "vue-router";
|
|
28
|
-
const
|
|
30
|
+
const He = /* @__PURE__ */ ee({
|
|
29
31
|
name: "FormRender",
|
|
30
32
|
__name: "form",
|
|
31
33
|
props: {
|
|
@@ -203,5 +205,5 @@ const Ue = /* @__PURE__ */ ee({
|
|
|
203
205
|
}
|
|
204
206
|
});
|
|
205
207
|
export {
|
|
206
|
-
|
|
208
|
+
He as default
|
|
207
209
|
};
|
|
@@ -2,8 +2,9 @@ import "axios";
|
|
|
2
2
|
import "element-plus";
|
|
3
3
|
import { isObject as f, isString as n } from "../../../../packages/utils/src/is.js";
|
|
4
4
|
import "vue";
|
|
5
|
-
import "xe-utils";
|
|
6
5
|
import "dayjs";
|
|
6
|
+
import "numeral";
|
|
7
|
+
import "xe-utils";
|
|
7
8
|
import "dayjs/plugin/utc";
|
|
8
9
|
import "dayjs/plugin/timezone";
|
|
9
10
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
@@ -12,24 +13,24 @@ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/en
|
|
|
12
13
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
13
14
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
14
15
|
import "lodash-es";
|
|
15
|
-
function r(
|
|
16
|
-
return !
|
|
16
|
+
function r(t) {
|
|
17
|
+
return !t || n(t) ? null : "innerType" in t.def ? r(t.def.innerType) : "schema" in t.def ? r(t.def.schema) : t;
|
|
17
18
|
}
|
|
18
|
-
function i(
|
|
19
|
-
if (!
|
|
19
|
+
function i(t) {
|
|
20
|
+
if (!t || n(t))
|
|
20
21
|
return;
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
23
|
-
if ("innerType" in
|
|
24
|
-
return i(
|
|
25
|
-
if ("schema" in
|
|
26
|
-
return i(
|
|
22
|
+
const e = t;
|
|
23
|
+
if (e.def.type === "default") return e.def.defaultValue;
|
|
24
|
+
if ("innerType" in e.def)
|
|
25
|
+
return i(e.def.innerType);
|
|
26
|
+
if ("schema" in e.def)
|
|
27
|
+
return i(e.def.schema);
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
-
return !
|
|
29
|
+
function v(t) {
|
|
30
|
+
return !t || !f(t) ? !1 : Reflect.has(t, "target") && Reflect.has(t, "stopPropagation");
|
|
30
31
|
}
|
|
31
32
|
export {
|
|
32
33
|
r as getBaseRules,
|
|
33
34
|
i as getDefaultValueInZodStack,
|
|
34
|
-
|
|
35
|
+
v as isEventObjectLike
|
|
35
36
|
};
|
|
@@ -2,6 +2,7 @@ import "axios";
|
|
|
2
2
|
import "element-plus";
|
|
3
3
|
import "dayjs";
|
|
4
4
|
import "vue";
|
|
5
|
+
import "numeral";
|
|
5
6
|
import { clnm as m } from "../../../../packages/utils/src/tool.js";
|
|
6
7
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
7
8
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
@@ -10,11 +11,11 @@ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mo
|
|
|
10
11
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
11
12
|
import "lodash-es";
|
|
12
13
|
const s = "grid-cols-1 sm:grid-cols-2 md:grid-cols-3";
|
|
13
|
-
function
|
|
14
|
+
function _(r) {
|
|
14
15
|
const { layout: p, compact: t, wrapperClass: i } = r, o = ["flex"];
|
|
15
16
|
return p === "inline" ? o.push("flex-wrap gap-x-2") : o.push(t ? "gap-x-2" : "gap-x-4", "flex-col grid"), m(...o, i ?? s);
|
|
16
17
|
}
|
|
17
18
|
export {
|
|
18
19
|
s as FORM_RENDER_DEFAULT_WRAPPER_CLASS,
|
|
19
|
-
|
|
20
|
+
_ as getFormRootWrapperClass
|
|
20
21
|
};
|
|
@@ -11,6 +11,7 @@ import { Store as j } from "@tanstack/vue-store";
|
|
|
11
11
|
import "axios";
|
|
12
12
|
import "element-plus";
|
|
13
13
|
import { isFunction as S, isObject as v, isDayjsObject as N, isDate as M } from "../../../packages/utils/src/is.js";
|
|
14
|
+
import "numeral";
|
|
14
15
|
import { bindMethods as Y } from "../../../packages/utils/src/tool.js";
|
|
15
16
|
import { mergeWithArrayOverride as V } from "../../../packages/utils/src/merge.js";
|
|
16
17
|
import "../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
@@ -54,7 +55,7 @@ function D(u, t = "YYYY-MM-DD") {
|
|
|
54
55
|
return String(u ?? "");
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
|
-
class
|
|
58
|
+
class pe {
|
|
58
59
|
constructor(t = {}) {
|
|
59
60
|
// private api: Pick<TtFormProps, 'handleReset' | 'handleSubmit'>;
|
|
60
61
|
h(this, "form", {});
|
|
@@ -795,7 +796,7 @@ class ye {
|
|
|
795
796
|
}
|
|
796
797
|
}
|
|
797
798
|
export {
|
|
798
|
-
|
|
799
|
+
pe as FormApi,
|
|
799
800
|
C as collectArrayFieldPathAliases,
|
|
800
801
|
g as normalizeArrayFieldPath
|
|
801
802
|
};
|
|
@@ -5,8 +5,9 @@ import { useDesign as Te } from "../../../../packages/hooks/src/useDesign.js";
|
|
|
5
5
|
import "axios";
|
|
6
6
|
import "element-plus";
|
|
7
7
|
import { isNumber as we, isFunction as ye } from "../../../../packages/utils/src/is.js";
|
|
8
|
-
import "xe-utils";
|
|
9
8
|
import "dayjs";
|
|
9
|
+
import "numeral";
|
|
10
|
+
import "xe-utils";
|
|
10
11
|
import "dayjs/plugin/utc";
|
|
11
12
|
import "dayjs/plugin/timezone";
|
|
12
13
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
@@ -25,7 +26,7 @@ import be from "./GroupSection.vue2.js";
|
|
|
25
26
|
import { RENDER_SCHEDULER_KEY as Ne, createRenderScheduler as Oe, GROUP_VISIBILITY_CALLBACK_KEY as He, HIDDEN_GROUP_KEYS_KEY as Pe } from "./lazyContext.js";
|
|
26
27
|
import { getSchemaKey as Ge, isGroupSchema as Ie } from "./utils.js";
|
|
27
28
|
import { getFormRootWrapperClass as ke } from "../form-render/rootWrapperClass.js";
|
|
28
|
-
const Le = 5, Ve = 500,
|
|
29
|
+
const Le = 5, Ve = 500, fo = /* @__PURE__ */ ae({
|
|
29
30
|
name: "TtVirtualGroupForm",
|
|
30
31
|
inheritAttrs: !1,
|
|
31
32
|
__name: "GroupForm",
|
|
@@ -250,5 +251,5 @@ const Le = 5, Ve = 500, vo = /* @__PURE__ */ ae({
|
|
|
250
251
|
}
|
|
251
252
|
});
|
|
252
253
|
export {
|
|
253
|
-
|
|
254
|
+
fo as default
|
|
254
255
|
};
|
|
@@ -7,6 +7,8 @@ import { useDesign as De } from "../../../../packages/hooks/src/useDesign.js";
|
|
|
7
7
|
import "axios";
|
|
8
8
|
import "element-plus";
|
|
9
9
|
import { isFunction as J, isString as Oe } from "../../../../packages/utils/src/is.js";
|
|
10
|
+
import "dayjs";
|
|
11
|
+
import "numeral";
|
|
10
12
|
import { clnm as c } from "../../../../packages/utils/src/tool.js";
|
|
11
13
|
import { mergeWithArrayOverride as me } from "../../../../packages/utils/src/merge.js";
|
|
12
14
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
@@ -4,6 +4,8 @@ import "../../../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9
|
|
|
4
4
|
import { useDesign as se } from "../../../../packages/hooks/src/useDesign.js";
|
|
5
5
|
import "axios";
|
|
6
6
|
import { isFunction as ae, isBoolean as ue } from "../../../../packages/utils/src/is.js";
|
|
7
|
+
import "dayjs";
|
|
8
|
+
import "numeral";
|
|
7
9
|
import { clnm as fe } from "../../../../packages/utils/src/tool.js";
|
|
8
10
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
9
11
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
@@ -17,7 +19,7 @@ import me from "../form-render/FormField.vue2.js";
|
|
|
17
19
|
import { injectFormProps as de } from "../useFormContext.js";
|
|
18
20
|
import { RENDER_SCHEDULER_KEY as pe } from "./lazyContext.js";
|
|
19
21
|
import { resolveValueByFieldName as ve } from "../form-render/dependencies.js";
|
|
20
|
-
const ge = ["data-field-anchor"],
|
|
22
|
+
const ge = ["data-field-anchor"], ze = /* @__PURE__ */ K({
|
|
21
23
|
name: "LazyFormField",
|
|
22
24
|
inheritAttrs: !1,
|
|
23
25
|
__name: "LazyFormField",
|
|
@@ -189,5 +191,5 @@ const ge = ["data-field-anchor"], xe = /* @__PURE__ */ K({
|
|
|
189
191
|
}
|
|
190
192
|
});
|
|
191
193
|
export {
|
|
192
|
-
|
|
194
|
+
ze as default
|
|
193
195
|
};
|
|
@@ -5,8 +5,9 @@ import "axios";
|
|
|
5
5
|
import "element-plus";
|
|
6
6
|
import { isString as F, isFunction as v, isBoolean as E } from "../../../../packages/utils/src/is.js";
|
|
7
7
|
import { ref as b, reactive as A, computed as T, nextTick as R } from "vue";
|
|
8
|
-
import "xe-utils";
|
|
9
8
|
import "dayjs";
|
|
9
|
+
import "numeral";
|
|
10
|
+
import "xe-utils";
|
|
10
11
|
import "dayjs/plugin/utc";
|
|
11
12
|
import "dayjs/plugin/timezone";
|
|
12
13
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
@@ -31,7 +32,7 @@ function Y(h) {
|
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
const J = 20;
|
|
34
|
-
class
|
|
35
|
+
class ge extends x {
|
|
35
36
|
/**
|
|
36
37
|
* @param {TtFormProps} formProps - 底层表单配置(已展平的 schema、layout 等)
|
|
37
38
|
* @param {GroupFormApiOptions} groupOptions - 分组场景专属配置
|
|
@@ -858,5 +859,5 @@ class Se extends x {
|
|
|
858
859
|
}
|
|
859
860
|
}
|
|
860
861
|
export {
|
|
861
|
-
|
|
862
|
+
ge as GroupFormApi
|
|
862
863
|
};
|
|
@@ -3,6 +3,7 @@ import "axios";
|
|
|
3
3
|
import "element-plus";
|
|
4
4
|
import "dayjs";
|
|
5
5
|
import { computed as c, unref as d, getCurrentInstance as b, useSlots as O, useAttrs as j } from "vue";
|
|
6
|
+
import "numeral";
|
|
6
7
|
import { getFirstNonNullOrUndefined as C } from "../../../../packages/utils/src/tool.js";
|
|
7
8
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
8
9
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
@@ -26,7 +27,7 @@ function g(o, u, t) {
|
|
|
26
27
|
);
|
|
27
28
|
});
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
+
function U(o, u) {
|
|
30
31
|
const t = {};
|
|
31
32
|
return Object.keys(o).forEach((r) => {
|
|
32
33
|
t[r] = g(r, o, u);
|
|
@@ -38,6 +39,6 @@ function T(o, u) {
|
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
U as useForwardPriorityValues,
|
|
42
43
|
g as usePriorityValue
|
|
43
44
|
};
|