@dazhicheng/ui 1.5.202 → 1.5.204
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/___vite-browser-external.js +6 -0
- package/dist/_virtual/__vite-browser-external.js +4 -0
- package/dist/_virtual/_commonjs-dynamic-modules.js +6 -0
- package/dist/_virtual/_commonjsHelpers.js +24 -0
- package/dist/_virtual/aes.js +4 -0
- package/dist/_virtual/cipher-core.js +4 -0
- package/dist/_virtual/core.js +4 -0
- package/dist/_virtual/enc-base64.js +4 -0
- package/dist/_virtual/enc-utf8.js +4 -0
- package/dist/_virtual/evpkdf.js +4 -0
- package/dist/_virtual/hmac.js +4 -0
- package/dist/_virtual/md5.js +4 -0
- package/dist/_virtual/mode-ecb.js +4 -0
- package/dist/_virtual/pad-pkcs7.js +4 -0
- package/dist/_virtual/sha1.js +4 -0
- package/dist/components/tt-api-component/index.js +17 -4
- package/dist/components/tt-api-component/index.vue2.js +24 -13
- package/dist/components/tt-area/TtArea.vue3.js +24 -13
- package/dist/components/tt-button/index.js +18 -5
- package/dist/components/tt-button/index.vue2.js +27 -16
- package/dist/components/tt-checkbox/index.js +17 -4
- package/dist/components/tt-checkbox/index.vue.js +38 -28
- package/dist/components/tt-drawer/index.js +17 -7
- package/dist/components/tt-drawer/src/RenderDrawer.vue.js +48 -36
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +39 -26
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue2.js +23 -10
- package/dist/components/tt-drawer/src/props.js +22 -9
- package/dist/components/tt-drawer/src/utils/drawer-api.js +42 -33
- package/dist/components/tt-empty/index.js +28 -18
- package/dist/components/tt-form/index.js +22 -14
- package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +23 -14
- package/dist/components/tt-form/src/components/FormActions.vue2.js +42 -32
- package/dist/components/tt-form/src/form/FormDescription.vue.js +19 -10
- package/dist/components/tt-form/src/form/FormItem.vue.js +18 -9
- package/dist/components/tt-form/src/form/FormLabel.vue.js +18 -9
- package/dist/components/tt-form/src/form/RenderContent.vue.js +25 -13
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +62 -55
- package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +36 -28
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +64 -56
- package/dist/components/tt-form/src/form-render/array-register/utils.js +18 -8
- package/dist/components/tt-form/src/form-render/dependencies.js +36 -24
- package/dist/components/tt-form/src/form-render/form.vue2.js +17 -7
- package/dist/components/tt-form/src/form-render/helper.js +29 -16
- package/dist/components/tt-form/src/form-render/rootWrapperClass.js +17 -7
- package/dist/components/tt-form/src/formApi.js +59 -48
- package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +17 -4
- package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +67 -57
- package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +55 -46
- package/dist/components/tt-form/src/group-form/groupFormApi.js +21 -10
- package/dist/components/tt-form/src/hooks/useForwardPriorityValues.js +27 -17
- package/dist/components/tt-form/src/hooks/useSelectCollapse.js +32 -23
- package/dist/components/tt-form/src/index.vue2.js +53 -45
- package/dist/components/tt-form/src/useFormContext.js +74 -62
- package/dist/components/tt-form-item-error-tooltip/index.js +18 -5
- package/dist/components/tt-form-item-error-tooltip/index.vue.js +32 -21
- package/dist/components/tt-icon/index.js +20 -7
- package/dist/components/tt-image/index.js +19 -6
- package/dist/components/tt-image/src/components/ImageViewer.js +27 -17
- package/dist/components/tt-loading/index.js +16 -4
- package/dist/components/tt-loading/src/directive.js +34 -22
- package/dist/components/tt-log/index.js +17 -4
- package/dist/components/tt-log/index.vue.js +21 -8
- package/dist/components/tt-modal/index.js +16 -5
- package/dist/components/tt-modal/src/RenderModal.vue.js +163 -151
- package/dist/components/tt-modal/src/components/ModalFooter.vue2.js +38 -28
- package/dist/components/tt-modal/src/components/ModalHeader.vue2.js +24 -11
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +36 -23
- package/dist/components/tt-modal/src/props.js +22 -9
- package/dist/components/tt-modal/src/utils/modal-api.js +39 -29
- package/dist/components/tt-modal-form/index.vue.js +44 -36
- package/dist/components/tt-nav-anchor/index.js +17 -4
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +69 -57
- package/dist/components/tt-panel-select/index.js +17 -4
- package/dist/components/tt-panel-select/src/hooks/usePanelData.js +51 -40
- package/dist/components/tt-panel-select/src/index.vue.js +35 -24
- package/dist/components/tt-select/index.js +17 -4
- package/dist/components/tt-select/src/Select.vue.js +79 -68
- package/dist/components/tt-select/src/components/SelectTable.vue.js +41 -30
- package/dist/components/tt-select/src/components/Table.vue.js +86 -76
- package/dist/components/tt-select/src/hooks/useDataSource.js +59 -49
- package/dist/components/tt-select/src/hooks/useSelect.js +46 -38
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.js +123 -112
- package/dist/components/tt-table/index.js +19 -12
- package/dist/components/tt-table/src/Table.vue.js +82 -71
- package/dist/components/tt-table/src/TableForm.vue.js +77 -65
- package/dist/components/tt-table/src/components/TableAction.vue.js +49 -39
- package/dist/components/tt-table/src/components/TableButtons.js +73 -60
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +14 -3
- package/dist/components/tt-table/src/components/TableToobalTools.vue.js +36 -25
- package/dist/components/tt-table/src/hooks/useColumns.js +72 -65
- package/dist/components/tt-table/src/hooks/useCustomColumns.js +43 -31
- package/dist/components/tt-table/src/hooks/useDataSource.js +50 -42
- package/dist/components/tt-table/src/hooks/usePagination.js +36 -25
- package/dist/components/tt-table/src/props.js +55 -42
- package/dist/components/tt-table/src/utils/table-api.js +33 -22
- package/dist/components/tt-table/src/utils/table-form-api.js +35 -24
- package/dist/components/tt-text/index.js +17 -4
- package/dist/components/tt-upload/index.js +19 -6
- package/dist/components/tt-upload/src/TtUpload.vue.js +77 -66
- package/dist/directives/disabled-tip/index.js +37 -26
- package/dist/hooks/useFormSchemasLink.js +90 -79
- package/dist/hooks/useScreenshotOss.js +49 -35
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js +64 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.js +545 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.js +508 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.js +81 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js +10 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.js +71 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.js +84 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.js +72 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js +22 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js +11 -0
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.js +50 -0
- package/dist/node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js +1024 -0
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.js +32 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/apply-style.js +11 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-node.js +92 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-pseudos.js +34 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/dataurl.js +52 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-images.js +43 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-resources.js +47 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-webfonts.js +122 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/index.js +30 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/mimes.js +24 -0
- package/dist/node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/util.js +106 -0
- package/dist/node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.js +16 -0
- package/dist/node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.js +21 -0
- package/dist/node_modules/.pnpm/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js +2922 -0
- package/dist/node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js +93 -0
- package/dist/packages/hooks/src/propTypes.js +17 -0
- package/dist/packages/hooks/src/tools.js +6 -0
- package/dist/packages/hooks/src/useDebounce.js +32 -0
- package/dist/packages/hooks/src/useDesign.js +12 -0
- package/dist/packages/hooks/src/useElementScreenshot.js +136 -0
- package/dist/packages/hooks/src/useIsScroll.js +12 -0
- package/dist/packages/hooks/src/usePriorityValue.js +45 -0
- package/dist/packages/utils/src/calc.js +14 -0
- package/dist/packages/utils/src/check.js +10 -0
- package/dist/packages/utils/src/install.js +11 -0
- package/dist/packages/utils/src/is.js +64 -0
- package/dist/packages/utils/src/merge.js +13 -0
- package/dist/packages/utils/src/stateHandler.js +33 -0
- package/dist/packages/utils/src/string.js +6 -0
- package/dist/packages/utils/src/testid-helper.js +14 -0
- package/dist/packages/utils/src/tool.js +181 -0
- package/dist/plugins/default/renderCellContent.js +39 -28
- package/dist/plugins/vxeTable/switchStatus.js +37 -26
- package/package.json +3 -3
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
import { defineComponent as we, computed as a, inject as ne, watch as Se, useSlots as be, createElementBlock as h, createCommentVNode as J, openBlock as i, normalizeClass as
|
|
1
|
+
import { defineComponent as we, computed as a, inject as ne, watch as Se, useSlots as be, createElementBlock as h, createCommentVNode as J, openBlock as i, normalizeClass as p, createBlock as w, unref as r, renderSlot as m, normalizeProps as y, mergeProps as f, resolveDynamicComponent as Fe, Fragment as H, renderList as S, createSlots as M, withCtx as k, guardReactiveProps as b, createElementVNode as F, withDirectives as Pe, createVNode as Ie, vShow as Ee } from "vue";
|
|
2
2
|
import Re from "../../../../assets/svg/arrowDown.svg.js";
|
|
3
3
|
import Ne from "../../../../assets/svg/arrowSUp.svg.js";
|
|
4
4
|
import { TtIcon as Ve } from "../../../tt-icon/index.js";
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
5
|
+
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";
|
|
6
|
+
import { useDesign as Le } from "../../../../packages/hooks/src/useDesign.js";
|
|
7
|
+
import "axios";
|
|
8
|
+
import "element-plus";
|
|
9
|
+
import { isFunction as Q, isString as De } from "../../../../packages/utils/src/is.js";
|
|
10
|
+
import { clnm as c } from "../../../../packages/utils/src/tool.js";
|
|
11
|
+
import { mergeWithArrayOverride as ue } from "../../../../packages/utils/src/merge.js";
|
|
12
|
+
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
13
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
14
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
15
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
16
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
17
|
+
import "lodash-es";
|
|
7
18
|
import { useFormValues as Oe } from "vee-validate";
|
|
8
19
|
import { injectRenderFormProps as Be } from "../form-render/context.js";
|
|
9
20
|
import "../components/Slot.js";
|
|
10
21
|
import "../../../tt-form-item-error-tooltip/index.js";
|
|
11
22
|
import "@vueuse/core";
|
|
12
|
-
import "element-plus";
|
|
13
23
|
/* empty css */
|
|
14
24
|
import Ge from "../form/RenderContent.vue.js";
|
|
15
25
|
import { FieldRenderer as X } from "../form-render/FormFieldContact.js";
|
|
@@ -32,37 +42,37 @@ const Te = ["data-group-key"], je = ["data-group-scroll-anchor"], me = "grid-col
|
|
|
32
42
|
estimateFieldHeight: { default: 52 }
|
|
33
43
|
},
|
|
34
44
|
emits: ["toggleCollapse"],
|
|
35
|
-
setup(fe, { emit:
|
|
36
|
-
const { prefixCls: s } = Le("group-section"), R = Oe(), N = Be().form,
|
|
37
|
-
const u =
|
|
45
|
+
setup(fe, { emit: pe }) {
|
|
46
|
+
const { prefixCls: s } = Le("group-section"), R = Oe(), N = Be().form, o = fe, x = pe, P = a(() => K(o.schema)), V = a(() => ie(o.schema)), ee = a(() => Z(o.schema)), l = a(() => P.value ? o.schema : null), $ = a(() => V.value ? o.schema : null), I = a(() => ee.value ? o.schema : null), T = ne(Ae, void 0), oe = a(() => {
|
|
47
|
+
const u = o.schema.ifShow;
|
|
38
48
|
return u === void 0 || u === !0 ? !0 : Q(u) ? !!u(R.value, N) : !!u;
|
|
39
|
-
}),
|
|
49
|
+
}), ce = a(() => !(!oe.value || P.value && l.value && (T != null && T.has(l.value.key)))), j = ne(He, void 0), le = a(() => $.value ? Me($.value.children) : []);
|
|
40
50
|
Se(
|
|
41
|
-
[
|
|
51
|
+
[oe],
|
|
42
52
|
([e]) => {
|
|
43
|
-
j && (P.value &&
|
|
53
|
+
j && (P.value && l.value ? j({ type: "group", key: l.value.key, visible: e }) : V.value && le.value.length && j({ type: "row", fieldNames: le.value, visible: e }));
|
|
44
54
|
},
|
|
45
55
|
{ immediate: !0 }
|
|
46
56
|
);
|
|
47
57
|
const E = a(() => {
|
|
48
|
-
if (!
|
|
49
|
-
const { collapsible: e } =
|
|
58
|
+
if (!l.value) return !1;
|
|
59
|
+
const { collapsible: e } = l.value;
|
|
50
60
|
return Q(e) ? e(R.value, N) : !!e;
|
|
51
61
|
}), z = a(
|
|
52
|
-
() =>
|
|
53
|
-
), re = a(() =>
|
|
54
|
-
collapseStates:
|
|
62
|
+
() => l.value && E.value ? !!o.collapseStates[l.value.key] : !1
|
|
63
|
+
), re = a(() => l.value ? ue(l.value.commonConfig ?? {}, o.commonConfig, o.globalCommonConfig) : ue(o.commonConfig, o.globalCommonConfig)), ve = a(() => ({
|
|
64
|
+
collapseStates: o.collapseStates,
|
|
55
65
|
commonConfig: re.value,
|
|
56
|
-
globalCommonConfig:
|
|
57
|
-
layout:
|
|
58
|
-
compact:
|
|
59
|
-
virtual:
|
|
60
|
-
scrollElement:
|
|
61
|
-
rootMargin:
|
|
62
|
-
estimateFieldHeight:
|
|
63
|
-
})), de = a(() =>
|
|
64
|
-
[`${s}--nested`]:
|
|
65
|
-
}) : V.value ?
|
|
66
|
+
globalCommonConfig: o.globalCommonConfig,
|
|
67
|
+
layout: o.layout,
|
|
68
|
+
compact: o.compact,
|
|
69
|
+
virtual: o.virtual,
|
|
70
|
+
scrollElement: o.scrollElement,
|
|
71
|
+
rootMargin: o.rootMargin,
|
|
72
|
+
estimateFieldHeight: o.estimateFieldHeight
|
|
73
|
+
})), de = a(() => l.value ? c("grid gap-x-4", l.value.wrapperClass || me) : ""), ge = a(() => $.value ? c("grid gap-x-4 col-span-full", $.value.wrapperClass || me) : ""), Ce = a(() => P.value ? c(s, `${s}--group`, {
|
|
74
|
+
[`${s}--nested`]: o.depth > 0
|
|
75
|
+
}) : V.value ? c(s, `${s}--row`, ge.value) : c(s, `${s}--transparent`));
|
|
66
76
|
function U(e, u) {
|
|
67
77
|
const {
|
|
68
78
|
colon: v = !1,
|
|
@@ -88,7 +98,7 @@ const Te = ["data-group-key"], je = ["data-group-scroll-anchor"], me = "grid-col
|
|
|
88
98
|
} catch {
|
|
89
99
|
q = "";
|
|
90
100
|
}
|
|
91
|
-
const _e = e.useArraySchema && !e.wrapperClass ?
|
|
101
|
+
const _e = e.useArraySchema && !e.wrapperClass ? c(se, u) : e.wrapperClass || se;
|
|
92
102
|
return {
|
|
93
103
|
colon: v,
|
|
94
104
|
disabled: O,
|
|
@@ -103,45 +113,45 @@ const Te = ["data-group-key"], je = ["data-group-scroll-anchor"], me = "grid-col
|
|
|
103
113
|
wrapperClass: _e,
|
|
104
114
|
commonComponentProps: _,
|
|
105
115
|
componentProps: e.componentProps,
|
|
106
|
-
controlClass:
|
|
116
|
+
controlClass: c(D, e.controlClass),
|
|
107
117
|
formFieldProps: { ...t, ...e.formFieldProps },
|
|
108
|
-
formItemClass:
|
|
109
|
-
labelClass:
|
|
118
|
+
formItemClass: c("flex-shrink-0", d, q),
|
|
119
|
+
labelClass: c(C, e.labelClass)
|
|
110
120
|
};
|
|
111
121
|
}
|
|
112
122
|
const L = a(() => ({
|
|
113
|
-
group:
|
|
123
|
+
group: l.value,
|
|
114
124
|
collapsed: z.value,
|
|
115
125
|
isCollapsible: E.value,
|
|
116
126
|
values: R.value,
|
|
117
127
|
formActions: N
|
|
118
128
|
})), te = be(), he = a(() => {
|
|
119
129
|
var v;
|
|
120
|
-
const e = (v =
|
|
130
|
+
const e = (v = l.value) == null ? void 0 : v.key, u = Object.keys(te);
|
|
121
131
|
return e ? u.filter((_) => !_.startsWith(`${e}-`)) : u;
|
|
122
132
|
});
|
|
123
133
|
function ye() {
|
|
124
|
-
E.value &&
|
|
134
|
+
E.value && l.value && x("toggleCollapse", l.value.key);
|
|
125
135
|
}
|
|
126
136
|
const ae = a(() => ({
|
|
127
137
|
values: R.value,
|
|
128
138
|
formActions: N
|
|
129
139
|
})), W = a(() => ({
|
|
130
|
-
virtual:
|
|
131
|
-
scrollElement:
|
|
132
|
-
rootMargin:
|
|
133
|
-
estimateFieldHeight:
|
|
140
|
+
virtual: o.virtual,
|
|
141
|
+
scrollElement: o.scrollElement,
|
|
142
|
+
rootMargin: o.rootMargin,
|
|
143
|
+
estimateFieldHeight: o.estimateFieldHeight
|
|
134
144
|
})), Y = a(() => Object.keys(te).filter((e) => e !== "default"));
|
|
135
145
|
return (e, u) => {
|
|
136
146
|
var v, _, D, O, B, G, A;
|
|
137
|
-
return
|
|
147
|
+
return ce.value ? (i(), h("div", {
|
|
138
148
|
key: 0,
|
|
139
|
-
class:
|
|
140
|
-
"data-group-key": (v =
|
|
149
|
+
class: p(Ce.value),
|
|
150
|
+
"data-group-key": (v = l.value) == null ? void 0 : v.key
|
|
141
151
|
}, [
|
|
142
152
|
ee.value && I.value ? (i(), h("div", {
|
|
143
153
|
key: 0,
|
|
144
|
-
class:
|
|
154
|
+
class: p([`${r(s)}__slot`, I.value.wrapperClass])
|
|
145
155
|
}, [
|
|
146
156
|
r(De)(I.value.content) ? m(e.$slots, I.value.content, y(f({ key: 0 }, ae.value))) : (i(), w(Fe(I.value.content(ae.value)), { key: 1 }))
|
|
147
157
|
], 2)) : V.value ? (i(!0), h(H, { key: 1 }, S($.value.children, (t, d) => {
|
|
@@ -165,34 +175,34 @@ const Te = ["data-group-key"], je = ["data-group-scroll-anchor"], me = "grid-col
|
|
|
165
175
|
]), 1040, ["field-config", "rules"]);
|
|
166
176
|
}), 128)) : P.value ? (i(), h(H, { key: 3 }, [
|
|
167
177
|
F("div", {
|
|
168
|
-
class:
|
|
178
|
+
class: p([
|
|
169
179
|
`${r(s)}__header`,
|
|
170
180
|
{ [`${r(s)}__header--collapsible`]: E.value, [`${r(s)}__header--bar`]: e.depth === 0 }
|
|
171
181
|
]),
|
|
172
|
-
"data-group-scroll-anchor": (_ =
|
|
182
|
+
"data-group-scroll-anchor": (_ = l.value) == null ? void 0 : _.key,
|
|
173
183
|
onClick: ye
|
|
174
184
|
}, [
|
|
175
185
|
F("div", {
|
|
176
|
-
class:
|
|
186
|
+
class: p(`${r(s)}__header-left`)
|
|
177
187
|
}, [
|
|
178
|
-
m(e.$slots, `${(D =
|
|
188
|
+
m(e.$slots, `${(D = l.value) == null ? void 0 : D.key}-header-left`, y(b(L.value))),
|
|
179
189
|
F("span", {
|
|
180
|
-
class:
|
|
190
|
+
class: p(`${r(s)}__title`)
|
|
181
191
|
}, [
|
|
182
|
-
(O =
|
|
192
|
+
(O = l.value) != null && O.title ? (i(), w(r(Ge), {
|
|
183
193
|
key: 0,
|
|
184
|
-
content:
|
|
194
|
+
content: l.value.title
|
|
185
195
|
}, null, 8, ["content"])) : J("", !0)
|
|
186
196
|
], 2),
|
|
187
|
-
m(e.$slots, `${(B =
|
|
197
|
+
m(e.$slots, `${(B = l.value) == null ? void 0 : B.key}-title-right`, y(b(L.value)))
|
|
188
198
|
], 2),
|
|
189
199
|
F("div", {
|
|
190
|
-
class:
|
|
200
|
+
class: p(`${r(s)}__header-right`)
|
|
191
201
|
}, [
|
|
192
|
-
m(e.$slots, `${(G =
|
|
202
|
+
m(e.$slots, `${(G = l.value) == null ? void 0 : G.key}-arrow-left`, y(b(L.value))),
|
|
193
203
|
E.value ? (i(), h("span", {
|
|
194
204
|
key: 0,
|
|
195
|
-
class:
|
|
205
|
+
class: p(`${r(s)}__arrow`)
|
|
196
206
|
}, [
|
|
197
207
|
Ie(r(Ve), {
|
|
198
208
|
icon: z.value ? r(Re) : r(Ne),
|
|
@@ -200,16 +210,16 @@ const Te = ["data-group-key"], je = ["data-group-scroll-anchor"], me = "grid-col
|
|
|
200
210
|
"is-custom-svg": ""
|
|
201
211
|
}, null, 8, ["icon"])
|
|
202
212
|
], 2)) : J("", !0),
|
|
203
|
-
m(e.$slots, `${(A =
|
|
213
|
+
m(e.$slots, `${(A = l.value) == null ? void 0 : A.key}-header-right`, y(b(L.value)))
|
|
204
214
|
], 2)
|
|
205
215
|
], 10, je),
|
|
206
216
|
Pe(F("div", {
|
|
207
|
-
class:
|
|
217
|
+
class: p(`${r(s)}__body`)
|
|
208
218
|
}, [
|
|
209
219
|
F("div", {
|
|
210
|
-
class:
|
|
220
|
+
class: p(de.value)
|
|
211
221
|
}, [
|
|
212
|
-
(i(!0), h(H, null, S(
|
|
222
|
+
(i(!0), h(H, null, S(l.value.children, (t, d) => {
|
|
213
223
|
var g;
|
|
214
224
|
return i(), h(H, {
|
|
215
225
|
key: r(Ke)(t, d)
|
|
@@ -230,7 +240,7 @@ const Te = ["data-group-key"], je = ["data-group-scroll-anchor"], me = "grid-col
|
|
|
230
240
|
}))
|
|
231
241
|
]), 1040, ["schema", "depth", "class"])) : (i(), w(r(X), f({
|
|
232
242
|
key: 1,
|
|
233
|
-
"field-config": U(t, (g =
|
|
243
|
+
"field-config": U(t, (g = l.value) == null ? void 0 : g.wrapperClass),
|
|
234
244
|
rules: t.rules
|
|
235
245
|
}, { ref_for: !0 }, W.value), M({
|
|
236
246
|
default: k((n) => [
|
|
@@ -257,7 +267,7 @@ const Te = ["data-group-key"], je = ["data-group-scroll-anchor"], me = "grid-col
|
|
|
257
267
|
rules: e.schema.rules
|
|
258
268
|
}, W.value), M({
|
|
259
269
|
default: k((t) => [
|
|
260
|
-
m(e.$slots,
|
|
270
|
+
m(e.$slots, o.schema.fieldName, y(b(t)))
|
|
261
271
|
]),
|
|
262
272
|
_: 2
|
|
263
273
|
}, [
|
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
import { defineComponent as D, inject as A, computed as U, ref as B, watch as Y, useTemplateRef as j, shallowRef as K, onMounted as O, onBeforeUnmount as G, createElementBlock as S, openBlock as h, normalizeClass as
|
|
1
|
+
import { defineComponent as D, inject as A, computed as U, ref as B, watch as Y, useTemplateRef as j, shallowRef as K, onMounted as O, onBeforeUnmount as G, createElementBlock as S, openBlock as h, normalizeClass as m, unref as n, createBlock as V, createCommentVNode as J, mergeProps as Q, withCtx as x, renderSlot as W, normalizeProps as X, guardReactiveProps as Z, normalizeStyle as N, createElementVNode as ee, createVNode as T, nextTick as z } from "vue";
|
|
2
2
|
import { ElSkeleton as te, ElSkeletonItem as L } from "element-plus";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
3
|
+
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";
|
|
4
|
+
import { useDesign as re } from "../../../../packages/hooks/src/useDesign.js";
|
|
5
|
+
import "axios";
|
|
6
|
+
import { isFunction as oe, isBoolean as le } from "../../../../packages/utils/src/is.js";
|
|
7
|
+
import { clnm as ne } from "../../../../packages/utils/src/tool.js";
|
|
8
|
+
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
9
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
10
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
11
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
12
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
13
|
+
import "lodash-es";
|
|
5
14
|
import { useFormValues as ie } from "vee-validate";
|
|
6
15
|
import se from "../form-render/FormField.vue2.js";
|
|
7
16
|
import { injectRenderFormProps as ae } from "../form-render/context.js";
|
|
8
17
|
import { VIRTUAL_ERROR_CACHE_KEY as ue, RENDER_SCHEDULER_KEY as fe } from "./lazyContext.js";
|
|
9
18
|
import { resolveValueByFieldName as ce } from "../form-render/dependencies.js";
|
|
10
|
-
const
|
|
19
|
+
const Se = /* @__PURE__ */ D({
|
|
11
20
|
name: "LazyFormField",
|
|
12
21
|
inheritAttrs: !1,
|
|
13
22
|
__name: "LazyFormField",
|
|
@@ -22,12 +31,12 @@ const Ce = /* @__PURE__ */ D({
|
|
|
22
31
|
skeletonAnimated: { type: Boolean, default: !0 }
|
|
23
32
|
},
|
|
24
33
|
setup(q) {
|
|
25
|
-
const { prefixCls: s } =
|
|
34
|
+
const { prefixCls: s } = re("lazy-form-field"), d = q, g = ae().form, p = d.fieldProps.fieldName, v = A(ue, void 0), _ = A(fe, void 0), C = ie(), k = U(() => d.fieldProps.dependencies), i = B(!0);
|
|
26
35
|
Y(
|
|
27
36
|
() => {
|
|
28
|
-
var
|
|
37
|
+
var r;
|
|
29
38
|
const e = k.value;
|
|
30
|
-
if ((
|
|
39
|
+
if ((r = e == null ? void 0 : e.triggerFields) != null && r.length)
|
|
31
40
|
return e.triggerFields.map((t) => ce(C.value, t));
|
|
32
41
|
},
|
|
33
42
|
async () => {
|
|
@@ -36,39 +45,39 @@ const Ce = /* @__PURE__ */ D({
|
|
|
36
45
|
i.value = !0;
|
|
37
46
|
return;
|
|
38
47
|
}
|
|
39
|
-
|
|
48
|
+
oe(e.if) ? i.value = !!await e.if(C.value, g) : le(e.if) && (i.value = e.if);
|
|
40
49
|
},
|
|
41
50
|
{ deep: !0, immediate: !0 }
|
|
42
51
|
);
|
|
43
|
-
const
|
|
52
|
+
const o = j("containerRef"), u = B(!1);
|
|
44
53
|
let f = !1;
|
|
45
|
-
const E = `${s}--offscreen`, H = K(
|
|
46
|
-
let a = null,
|
|
54
|
+
const E = `${s}--offscreen`, H = K(d.estimateHeight);
|
|
55
|
+
let a = null, l = null, y = null;
|
|
47
56
|
async function I() {
|
|
48
57
|
if (!g || !p) return;
|
|
49
|
-
const
|
|
50
|
-
|
|
58
|
+
const r = v == null ? void 0 : v.get(p);
|
|
59
|
+
r && (v.delete(p), await z(), g.setFieldError(p, r));
|
|
51
60
|
}
|
|
52
61
|
function w(e) {
|
|
53
|
-
let
|
|
54
|
-
for (;
|
|
55
|
-
const t = getComputedStyle(
|
|
56
|
-
if (t === "auto" || t === "scroll") return
|
|
57
|
-
|
|
62
|
+
let r = e.parentElement;
|
|
63
|
+
for (; r; ) {
|
|
64
|
+
const t = getComputedStyle(r).overflowY;
|
|
65
|
+
if (t === "auto" || t === "scroll") return r;
|
|
66
|
+
r = r.parentElement;
|
|
58
67
|
}
|
|
59
68
|
return null;
|
|
60
69
|
}
|
|
61
70
|
function P() {
|
|
62
|
-
const e =
|
|
71
|
+
const e = o.value;
|
|
63
72
|
if (!e || u.value) return;
|
|
64
|
-
const
|
|
65
|
-
e.style.height = `${
|
|
73
|
+
const r = e.offsetHeight;
|
|
74
|
+
e.style.height = `${r}px`, e.style.overflow = "hidden", u.value = !0, I(), z(() => {
|
|
66
75
|
requestAnimationFrame(() => {
|
|
67
|
-
const t =
|
|
76
|
+
const t = o.value;
|
|
68
77
|
if (!t) return;
|
|
69
|
-
const $ = t.scrollHeight -
|
|
78
|
+
const $ = t.scrollHeight - r;
|
|
70
79
|
t.style.height = "", t.style.overflow = "", !(Math.abs($) <= 2) && requestAnimationFrame(() => {
|
|
71
|
-
const R =
|
|
80
|
+
const R = o.value;
|
|
72
81
|
if (!R) return;
|
|
73
82
|
const F = y ?? w(R);
|
|
74
83
|
if (!F) return;
|
|
@@ -79,41 +88,41 @@ const Ce = /* @__PURE__ */ D({
|
|
|
79
88
|
});
|
|
80
89
|
}
|
|
81
90
|
return O(() => {
|
|
82
|
-
|
|
91
|
+
o.value && (y = w(o.value), a = new IntersectionObserver(
|
|
83
92
|
(e) => {
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
86
|
-
if (
|
|
93
|
+
const r = e[0];
|
|
94
|
+
if (r)
|
|
95
|
+
if (r.isIntersecting) {
|
|
87
96
|
f = !0;
|
|
88
|
-
const t =
|
|
89
|
-
t && (t.style.minHeight = "", t.classList.remove(E)), !u.value && !
|
|
90
|
-
|
|
97
|
+
const t = o.value;
|
|
98
|
+
t && (t.style.minHeight = "", t.classList.remove(E)), !u.value && !l && i.value && (l = _ ? _.request(() => {
|
|
99
|
+
l = null, !(!f || !i.value) && P();
|
|
91
100
|
}) : (() => {
|
|
92
101
|
const c = requestAnimationFrame(() => {
|
|
93
|
-
|
|
102
|
+
l = null, !(!f || !i.value) && P();
|
|
94
103
|
});
|
|
95
104
|
return () => cancelAnimationFrame(c);
|
|
96
105
|
})());
|
|
97
106
|
} else
|
|
98
|
-
f = !1, u.value &&
|
|
107
|
+
f = !1, u.value && o.value && requestAnimationFrame(() => {
|
|
99
108
|
if (f) return;
|
|
100
|
-
const t =
|
|
109
|
+
const t = o.value;
|
|
101
110
|
if (!(t != null && t.isConnected)) return;
|
|
102
111
|
const c = t.offsetHeight;
|
|
103
112
|
c !== 0 && (t.style.minHeight = `${c}px`, t.classList.add(E));
|
|
104
|
-
}),
|
|
113
|
+
}), l && (l(), l = null);
|
|
105
114
|
},
|
|
106
115
|
{
|
|
107
116
|
root: y,
|
|
108
|
-
rootMargin:
|
|
117
|
+
rootMargin: d.rootMargin
|
|
109
118
|
}
|
|
110
|
-
), a.observe(
|
|
119
|
+
), a.observe(o.value));
|
|
111
120
|
}), G(() => {
|
|
112
|
-
|
|
113
|
-
}), (e,
|
|
121
|
+
l && (l(), l = null), a == null || a.disconnect(), a = null;
|
|
122
|
+
}), (e, r) => (h(), S("div", {
|
|
114
123
|
ref_key: "containerRef",
|
|
115
|
-
ref:
|
|
116
|
-
class:
|
|
124
|
+
ref: o,
|
|
125
|
+
class: m(n(ne)(n(s), e.fieldClass, { [`${n(s)}--hidden`]: !i.value }))
|
|
117
126
|
}, [
|
|
118
127
|
u.value ? (h(), V(se, Q({ key: 0 }, e.fieldProps, { rules: e.rules }), {
|
|
119
128
|
default: x((t) => [
|
|
@@ -123,20 +132,20 @@ const Ce = /* @__PURE__ */ D({
|
|
|
123
132
|
}, 16, ["rules"])) : e.skeleton && i.value ? (h(), V(n(te), {
|
|
124
133
|
key: 1,
|
|
125
134
|
animated: e.skeletonAnimated,
|
|
126
|
-
class:
|
|
135
|
+
class: m(`${n(s)}__skeleton`),
|
|
127
136
|
style: N({ minHeight: `${H.value}px` })
|
|
128
137
|
}, {
|
|
129
138
|
template: x(() => [
|
|
130
139
|
ee("div", {
|
|
131
|
-
class:
|
|
140
|
+
class: m(`${n(s)}__row`)
|
|
132
141
|
}, [
|
|
133
142
|
T(n(L), {
|
|
134
143
|
variant: "text",
|
|
135
|
-
class:
|
|
144
|
+
class: m(`${n(s)}__label`)
|
|
136
145
|
}, null, 8, ["class"]),
|
|
137
146
|
T(n(L), {
|
|
138
147
|
variant: "rect",
|
|
139
|
-
class:
|
|
148
|
+
class: m(`${n(s)}__control`)
|
|
140
149
|
}, null, 8, ["class"])
|
|
141
150
|
], 2)
|
|
142
151
|
]),
|
|
@@ -149,5 +158,5 @@ const Ce = /* @__PURE__ */ D({
|
|
|
149
158
|
}
|
|
150
159
|
});
|
|
151
160
|
export {
|
|
152
|
-
|
|
161
|
+
Se as default
|
|
153
162
|
};
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
var M = Object.defineProperty;
|
|
2
2
|
var A = (u, c, e) => c in u ? M(u, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[c] = e;
|
|
3
3
|
var n = (u, c, e) => A(u, typeof c != "symbol" ? c + "" : c, e);
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
4
|
+
import "axios";
|
|
5
|
+
import "element-plus";
|
|
6
|
+
import { isFunction as S, isString as b, isBoolean as G } from "../../../../packages/utils/src/is.js";
|
|
7
|
+
import { ref as N, reactive as p, nextTick as C } from "vue";
|
|
8
|
+
import "xe-utils";
|
|
9
|
+
import "dayjs";
|
|
10
|
+
import "dayjs/plugin/utc";
|
|
11
|
+
import "dayjs/plugin/timezone";
|
|
12
|
+
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
13
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
14
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
15
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
16
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
17
|
+
import { isPlainObject as f, get as v, cloneDeep as V } from "lodash-es";
|
|
7
18
|
import { FormApi as P } from "../formApi.js";
|
|
8
19
|
import { resolveValueByFieldName as E } from "../form-render/dependencies.js";
|
|
9
20
|
import { resolveSchemaFieldInitialValue as k } from "../useFormContext.js";
|
|
10
21
|
import { normalizeArrayFieldPath as y, childArrayPath as H } from "../utils/array-path.js";
|
|
11
22
|
import { extractFlatSchemas as m, collectDefaultCollapseStates as w, getGroupValues as K, cloneSchemaTree as _, insertFieldsByPosition as O, removeFieldsFromGroup as j, removeGroupsFromGroup as T, isGroupSchema as R, isRowSchema as x } from "./utils.js";
|
|
12
|
-
class
|
|
23
|
+
class ae extends P {
|
|
13
24
|
/**
|
|
14
25
|
* @param {TtFormProps} formProps - 底层表单配置(已展平的 schema、layout 等)
|
|
15
26
|
* @param {GroupFormApiOptions} groupOptions - 分组场景专属配置
|
|
@@ -78,7 +89,7 @@ class L extends P {
|
|
|
78
89
|
estimateFieldHeight: h = 52,
|
|
79
90
|
scrollOffset: d = 0
|
|
80
91
|
} = t;
|
|
81
|
-
this.virtual = s, this._defaultNavAnchorProps = { show: !0, ...o }, this._scrollToFirstError = i, this._containerHeight = a, this._rootMargin = l, this._estimateFieldHeight = h, this._scrollOffset = d, this._initialGroupSchema = r, this._initialFlatSchema = m(r), this.collapseStates =
|
|
92
|
+
this.virtual = s, this._defaultNavAnchorProps = { show: !0, ...o }, this._scrollToFirstError = i, this._containerHeight = a, this._rootMargin = l, this._estimateFieldHeight = h, this._scrollOffset = d, this._initialGroupSchema = r, this._initialFlatSchema = m(r), this.collapseStates = p({}), w(r, this.collapseStates), this.hiddenGroupKeys = p(/* @__PURE__ */ new Set()), this.hiddenFieldNames = p(/* @__PURE__ */ new Set()), this.navErrorCounts = p({}), this._buildGroupFieldMap(r), this.setState({
|
|
82
93
|
groupSchema: r,
|
|
83
94
|
navAnchorProps: this._defaultNavAnchorProps,
|
|
84
95
|
virtual: s,
|
|
@@ -610,8 +621,8 @@ class L extends P {
|
|
|
610
621
|
const r = Array.isArray(t) ? t : [];
|
|
611
622
|
return e.map((s, o) => this._clearValueKeepStructure(s, r[o] ?? r[0]));
|
|
612
623
|
}
|
|
613
|
-
if (
|
|
614
|
-
const r =
|
|
624
|
+
if (f(e)) {
|
|
625
|
+
const r = f(t) ? t : {};
|
|
615
626
|
return Object.fromEntries(
|
|
616
627
|
Object.keys(e).map((s) => [
|
|
617
628
|
s,
|
|
@@ -619,9 +630,9 @@ class L extends P {
|
|
|
619
630
|
])
|
|
620
631
|
);
|
|
621
632
|
}
|
|
622
|
-
if (e === void 0 && (Array.isArray(t) ||
|
|
633
|
+
if (e === void 0 && (Array.isArray(t) || f(t)))
|
|
623
634
|
return this._clearValueKeepStructure(t, t);
|
|
624
|
-
if (t !== void 0 && !Array.isArray(t) && !
|
|
635
|
+
if (t !== void 0 && !Array.isArray(t) && !f(t))
|
|
625
636
|
return V(t);
|
|
626
637
|
}
|
|
627
638
|
/**
|
|
@@ -696,5 +707,5 @@ class L extends P {
|
|
|
696
707
|
}
|
|
697
708
|
}
|
|
698
709
|
export {
|
|
699
|
-
|
|
710
|
+
ae as GroupFormApi
|
|
700
711
|
};
|
|
@@ -1,33 +1,43 @@
|
|
|
1
|
-
import { kebabToCamelCase as
|
|
2
|
-
import
|
|
1
|
+
import { kebabToCamelCase as v } from "../../../../packages/utils/src/string.js";
|
|
2
|
+
import "axios";
|
|
3
|
+
import "element-plus";
|
|
4
|
+
import "dayjs";
|
|
5
|
+
import { computed as c, unref as d, getCurrentInstance as b, useSlots as O, useAttrs as j } from "vue";
|
|
6
|
+
import { getFirstNonNullOrUndefined as C } from "../../../../packages/utils/src/tool.js";
|
|
7
|
+
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
8
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
9
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
10
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
11
|
+
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
12
|
+
import "lodash-es";
|
|
3
13
|
function g(o, u, t) {
|
|
4
|
-
const r =
|
|
5
|
-
return
|
|
6
|
-
var
|
|
7
|
-
const
|
|
8
|
-
for (const [
|
|
9
|
-
n[
|
|
10
|
-
const
|
|
11
|
-
return
|
|
14
|
+
const r = b(), e = O(), m = j();
|
|
15
|
+
return c(() => {
|
|
16
|
+
var i, s;
|
|
17
|
+
const p = ((i = r == null ? void 0 : r.vnode) == null ? void 0 : i.props) || {}, n = {};
|
|
18
|
+
for (const [f, a] of Object.entries(p))
|
|
19
|
+
n[v(f)] = a;
|
|
20
|
+
const l = (n == null ? void 0 : n[o]) === void 0 ? void 0 : u[o];
|
|
21
|
+
return C(
|
|
12
22
|
e[o],
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
(
|
|
23
|
+
m[o],
|
|
24
|
+
l,
|
|
25
|
+
(s = t == null ? void 0 : t.value) == null ? void 0 : s[o]
|
|
16
26
|
);
|
|
17
27
|
});
|
|
18
28
|
}
|
|
19
|
-
function
|
|
29
|
+
function T(o, u) {
|
|
20
30
|
const t = {};
|
|
21
31
|
return Object.keys(o).forEach((r) => {
|
|
22
32
|
t[r] = g(r, o, u);
|
|
23
|
-
}),
|
|
33
|
+
}), c(() => {
|
|
24
34
|
const r = {};
|
|
25
35
|
return Object.keys(o).forEach((e) => {
|
|
26
|
-
r[e] =
|
|
36
|
+
r[e] = d(t[e]);
|
|
27
37
|
}), r;
|
|
28
38
|
});
|
|
29
39
|
}
|
|
30
40
|
export {
|
|
31
|
-
|
|
41
|
+
T as useForwardPriorityValues,
|
|
32
42
|
g as usePriorityValue
|
|
33
43
|
};
|