@dazhicheng/ui 1.5.201 → 1.5.203
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/svg/RiRefreshLine.svg.js +4 -0
- package/dist/assets/svg/add.svg.js +4 -0
- package/dist/assets/svg/addCircleLine.svg.js +4 -0
- package/dist/assets/svg/arrowDown.svg.js +4 -0
- package/dist/assets/svg/arrowLineDown.svg.js +5 -0
- package/dist/assets/svg/arrowSUp.svg.js +4 -0
- package/dist/assets/svg/arrowUp.svg.js +4 -0
- package/dist/assets/svg/columnSet.svg.js +4 -0
- package/dist/assets/svg/determinateCircleLine.svg.js +5 -0
- package/dist/assets/svg/drag.svg.js +5 -0
- package/dist/assets/svg/exportSvg.svg.js +4 -0
- package/dist/assets/svg/fileSvg.svg.js +4 -0
- package/dist/assets/svg/help.svg.js +4 -0
- package/dist/components/tt-area/TtArea.vue.js +1 -1
- package/dist/components/tt-button/components/AddButton.vue.js +2 -2
- package/dist/components/tt-checkbox/index.vue.js +7 -7
- package/dist/components/tt-drawer/index.js +1 -1
- package/dist/components/tt-drawer/src/RenderDrawer.vue.js +18 -17
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +1 -1
- package/dist/components/tt-drawer/src/props.js +1 -1
- package/dist/components/tt-drawer/src/utils/drawer-api.js +1 -1
- package/dist/components/tt-empty/index.js +1 -1
- package/dist/components/tt-form/index.js +11 -17
- package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +3 -3
- package/dist/components/tt-form/src/components/FormActions.vue2.js +1 -1
- package/dist/components/tt-form/src/config.js +4 -4
- package/dist/components/tt-form/src/form/FormMessageToolTip.vue.js +1 -1
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +3 -4
- package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +6 -7
- package/dist/components/tt-form/src/form-render/form.vue2.js +4 -5
- package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +1 -1
- package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +25 -26
- package/dist/components/tt-form/src/index.vue2.js +5 -7
- package/dist/components/tt-form-item-error-tooltip/index.js +2 -2
- package/dist/components/tt-icon/components/AddIcon.vue.js +1 -1
- package/dist/components/tt-icon/components/SubIcon.vue.js +1 -1
- package/dist/components/tt-log/index.vue.js +5 -4
- package/dist/components/tt-modal/index.js +1 -1
- package/dist/components/tt-modal/src/RenderModal.vue.js +26 -26
- package/dist/components/tt-modal/src/props.js +1 -1
- package/dist/components/tt-modal/src/utils/modal-api.js +1 -1
- package/dist/components/tt-modal-form/index.vue.js +47 -24
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +14 -14
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.js +2 -2
- package/dist/components/tt-panel-select/src/components/PanelRight.vue.js +14 -14
- package/dist/components/tt-select/src/Select.vue.js +27 -27
- package/dist/components/tt-select/src/components/SelectTable.vue.js +1 -1
- package/dist/components/tt-select/src/components/Table.vue.js +2 -2
- package/dist/components/tt-table/index.js +48 -18
- package/dist/components/tt-table/src/Table.vue.js +2 -2
- package/dist/components/tt-table/src/TableForm.vue.js +120 -81
- package/dist/components/tt-table/src/components/TableAction.vue.js +3 -3
- package/dist/components/tt-table/src/components/TableButtons.js +9 -9
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +19 -18
- package/dist/components/tt-table/src/components/TableToobalTools.vue.js +4 -4
- package/dist/components/tt-table/src/hooks/useCellArea.js +1 -1
- package/dist/components/tt-table/src/hooks/useColumns.js +1 -1
- package/dist/components/tt-table/src/hooks/useCustomColumns.js +1 -1
- package/dist/components/tt-table/src/hooks/useDataSource.js +1 -1
- package/dist/components/tt-table/src/hooks/usePagination.js +1 -1
- package/dist/components/tt-table/src/hooks/useTableSlot.js +1 -1
- package/dist/components/tt-table/src/props.js +1 -1
- package/dist/components/tt-table/src/utils/table-api.js +1 -1
- package/dist/components/tt-text/index.vue2.js +1 -1
- package/dist/components/tt-upload/src/TtUpload.vue.js +71 -70
- package/dist/directives/dialog-resize/index.js +10 -10
- package/dist/hooks/useScreenshotOss.js +1 -1
- package/dist/hooks/useTable.js +13 -0
- package/dist/hooks/useTemplateSlot.js +13 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- /package/dist/components/tt-area/{TtArea.vue2.js → TtArea.vue3.js} +0 -0
|
@@ -1,14 +1,13 @@
|
|
|
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
|
|
2
|
-
import Re from "
|
|
3
|
-
import Ne from "
|
|
4
|
-
import Ve from "
|
|
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 c, 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
|
+
import Re from "../../../../assets/svg/arrowDown.svg.js";
|
|
3
|
+
import Ne from "../../../../assets/svg/arrowSUp.svg.js";
|
|
4
|
+
import { TtIcon as Ve } from "../../../tt-icon/index.js";
|
|
5
5
|
import { useDesign as Le } from "@dazhicheng/hooks";
|
|
6
|
-
import { isFunction as Q, mergeWithArrayOverride as ue, clnm as
|
|
6
|
+
import { isFunction as Q, mergeWithArrayOverride as ue, clnm as p, isString as De } from "@dazhicheng/utils";
|
|
7
7
|
import { useFormValues as Oe } from "vee-validate";
|
|
8
8
|
import { injectRenderFormProps as Be } from "../form-render/context.js";
|
|
9
9
|
import "../components/Slot.js";
|
|
10
|
-
import "
|
|
11
|
-
import "@dazhicheng-ui/assets/img/FormItemWarning.jpeg?inline";
|
|
10
|
+
import "../../../tt-form-item-error-tooltip/index.js";
|
|
12
11
|
import "@vueuse/core";
|
|
13
12
|
import "element-plus";
|
|
14
13
|
/* empty css */
|
|
@@ -33,11 +32,11 @@ const Te = ["data-group-key"], je = ["data-group-scroll-anchor"], me = "grid-col
|
|
|
33
32
|
estimateFieldHeight: { default: 52 }
|
|
34
33
|
},
|
|
35
34
|
emits: ["toggleCollapse"],
|
|
36
|
-
setup(fe, { emit:
|
|
37
|
-
const { prefixCls: s } = Le("group-section"), R = Oe(), N = Be().form, l = fe, x =
|
|
35
|
+
setup(fe, { emit: ce }) {
|
|
36
|
+
const { prefixCls: s } = Le("group-section"), R = Oe(), N = Be().form, l = fe, x = ce, P = a(() => K(l.schema)), V = a(() => ie(l.schema)), ee = a(() => Z(l.schema)), o = a(() => P.value ? l.schema : null), $ = a(() => V.value ? l.schema : null), I = a(() => ee.value ? l.schema : null), T = ne(Ae, void 0), le = a(() => {
|
|
38
37
|
const u = l.schema.ifShow;
|
|
39
38
|
return u === void 0 || u === !0 ? !0 : Q(u) ? !!u(R.value, N) : !!u;
|
|
40
|
-
}),
|
|
39
|
+
}), pe = a(() => !(!le.value || P.value && o.value && (T != null && T.has(o.value.key)))), j = ne(He, void 0), oe = a(() => $.value ? Me($.value.children) : []);
|
|
41
40
|
Se(
|
|
42
41
|
[le],
|
|
43
42
|
([e]) => {
|
|
@@ -61,9 +60,9 @@ const Te = ["data-group-key"], je = ["data-group-scroll-anchor"], me = "grid-col
|
|
|
61
60
|
scrollElement: l.scrollElement,
|
|
62
61
|
rootMargin: l.rootMargin,
|
|
63
62
|
estimateFieldHeight: l.estimateFieldHeight
|
|
64
|
-
})), de = a(() => o.value ?
|
|
63
|
+
})), de = a(() => o.value ? p("grid gap-x-4", o.value.wrapperClass || me) : ""), ge = a(() => $.value ? p("grid gap-x-4 col-span-full", $.value.wrapperClass || me) : ""), Ce = a(() => P.value ? p(s, `${s}--group`, {
|
|
65
64
|
[`${s}--nested`]: l.depth > 0
|
|
66
|
-
}) : V.value ?
|
|
65
|
+
}) : V.value ? p(s, `${s}--row`, ge.value) : p(s, `${s}--transparent`));
|
|
67
66
|
function U(e, u) {
|
|
68
67
|
const {
|
|
69
68
|
colon: v = !1,
|
|
@@ -89,7 +88,7 @@ const Te = ["data-group-key"], je = ["data-group-scroll-anchor"], me = "grid-col
|
|
|
89
88
|
} catch {
|
|
90
89
|
q = "";
|
|
91
90
|
}
|
|
92
|
-
const _e = e.useArraySchema && !e.wrapperClass ?
|
|
91
|
+
const _e = e.useArraySchema && !e.wrapperClass ? p(se, u) : e.wrapperClass || se;
|
|
93
92
|
return {
|
|
94
93
|
colon: v,
|
|
95
94
|
disabled: O,
|
|
@@ -104,10 +103,10 @@ const Te = ["data-group-key"], je = ["data-group-scroll-anchor"], me = "grid-col
|
|
|
104
103
|
wrapperClass: _e,
|
|
105
104
|
commonComponentProps: _,
|
|
106
105
|
componentProps: e.componentProps,
|
|
107
|
-
controlClass:
|
|
106
|
+
controlClass: p(D, e.controlClass),
|
|
108
107
|
formFieldProps: { ...t, ...e.formFieldProps },
|
|
109
|
-
formItemClass:
|
|
110
|
-
labelClass:
|
|
108
|
+
formItemClass: p("flex-shrink-0", d, q),
|
|
109
|
+
labelClass: p(C, e.labelClass)
|
|
111
110
|
};
|
|
112
111
|
}
|
|
113
112
|
const L = a(() => ({
|
|
@@ -135,14 +134,14 @@ const Te = ["data-group-key"], je = ["data-group-scroll-anchor"], me = "grid-col
|
|
|
135
134
|
})), Y = a(() => Object.keys(te).filter((e) => e !== "default"));
|
|
136
135
|
return (e, u) => {
|
|
137
136
|
var v, _, D, O, B, G, A;
|
|
138
|
-
return
|
|
137
|
+
return pe.value ? (i(), h("div", {
|
|
139
138
|
key: 0,
|
|
140
|
-
class:
|
|
139
|
+
class: c(Ce.value),
|
|
141
140
|
"data-group-key": (v = o.value) == null ? void 0 : v.key
|
|
142
141
|
}, [
|
|
143
142
|
ee.value && I.value ? (i(), h("div", {
|
|
144
143
|
key: 0,
|
|
145
|
-
class:
|
|
144
|
+
class: c([`${r(s)}__slot`, I.value.wrapperClass])
|
|
146
145
|
}, [
|
|
147
146
|
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 }))
|
|
148
147
|
], 2)) : V.value ? (i(!0), h(H, { key: 1 }, S($.value.children, (t, d) => {
|
|
@@ -166,7 +165,7 @@ const Te = ["data-group-key"], je = ["data-group-scroll-anchor"], me = "grid-col
|
|
|
166
165
|
]), 1040, ["field-config", "rules"]);
|
|
167
166
|
}), 128)) : P.value ? (i(), h(H, { key: 3 }, [
|
|
168
167
|
F("div", {
|
|
169
|
-
class:
|
|
168
|
+
class: c([
|
|
170
169
|
`${r(s)}__header`,
|
|
171
170
|
{ [`${r(s)}__header--collapsible`]: E.value, [`${r(s)}__header--bar`]: e.depth === 0 }
|
|
172
171
|
]),
|
|
@@ -174,11 +173,11 @@ const Te = ["data-group-key"], je = ["data-group-scroll-anchor"], me = "grid-col
|
|
|
174
173
|
onClick: ye
|
|
175
174
|
}, [
|
|
176
175
|
F("div", {
|
|
177
|
-
class:
|
|
176
|
+
class: c(`${r(s)}__header-left`)
|
|
178
177
|
}, [
|
|
179
178
|
m(e.$slots, `${(D = o.value) == null ? void 0 : D.key}-header-left`, y(b(L.value))),
|
|
180
179
|
F("span", {
|
|
181
|
-
class:
|
|
180
|
+
class: c(`${r(s)}__title`)
|
|
182
181
|
}, [
|
|
183
182
|
(O = o.value) != null && O.title ? (i(), w(r(Ge), {
|
|
184
183
|
key: 0,
|
|
@@ -188,12 +187,12 @@ const Te = ["data-group-key"], je = ["data-group-scroll-anchor"], me = "grid-col
|
|
|
188
187
|
m(e.$slots, `${(B = o.value) == null ? void 0 : B.key}-title-right`, y(b(L.value)))
|
|
189
188
|
], 2),
|
|
190
189
|
F("div", {
|
|
191
|
-
class:
|
|
190
|
+
class: c(`${r(s)}__header-right`)
|
|
192
191
|
}, [
|
|
193
192
|
m(e.$slots, `${(G = o.value) == null ? void 0 : G.key}-arrow-left`, y(b(L.value))),
|
|
194
193
|
E.value ? (i(), h("span", {
|
|
195
194
|
key: 0,
|
|
196
|
-
class:
|
|
195
|
+
class: c(`${r(s)}__arrow`)
|
|
197
196
|
}, [
|
|
198
197
|
Ie(r(Ve), {
|
|
199
198
|
icon: z.value ? r(Re) : r(Ne),
|
|
@@ -205,10 +204,10 @@ const Te = ["data-group-key"], je = ["data-group-scroll-anchor"], me = "grid-col
|
|
|
205
204
|
], 2)
|
|
206
205
|
], 10, je),
|
|
207
206
|
Pe(F("div", {
|
|
208
|
-
class:
|
|
207
|
+
class: c(`${r(s)}__body`)
|
|
209
208
|
}, [
|
|
210
209
|
F("div", {
|
|
211
|
-
class:
|
|
210
|
+
class: c(de.value)
|
|
212
211
|
}, [
|
|
213
212
|
(i(!0), h(H, null, S(o.value.children, (t, d) => {
|
|
214
213
|
var g;
|
|
@@ -9,20 +9,18 @@ import J from "./components/FormActions.vue2.js";
|
|
|
9
9
|
import { DEFAULT_FORM_COMMON_CONFIG as Q, COMPONENT_MAP as X, COMPONENT_BIND_EVENT_MAP as Y } from "./config.js";
|
|
10
10
|
import "./components/Slot.js";
|
|
11
11
|
import "vee-validate";
|
|
12
|
-
import "
|
|
13
|
-
import "
|
|
14
|
-
import "@dazhicheng-ui/components/tt-icon";
|
|
12
|
+
import "../../tt-form-item-error-tooltip/index.js";
|
|
13
|
+
import "../../tt-icon/index.js";
|
|
15
14
|
import "element-plus";
|
|
16
15
|
/* empty css */
|
|
17
16
|
import "./form/RenderContent.vue.js";
|
|
18
17
|
import "@vee-validate/zod";
|
|
19
18
|
import { useFormInitial as Z, provideFormProps as ee, provideComponentRefMap as oe } from "./useFormContext.js";
|
|
20
19
|
import "es-toolkit/compat";
|
|
21
|
-
import "
|
|
22
|
-
import "@dazhicheng-ui/components/tt-text";
|
|
20
|
+
import "../../tt-text/index.js";
|
|
23
21
|
import te from "./form-render/form.vue2.js";
|
|
24
22
|
/* empty css */
|
|
25
|
-
const
|
|
23
|
+
const Me = /* @__PURE__ */ P({
|
|
26
24
|
name: "TtForm",
|
|
27
25
|
__name: "index",
|
|
28
26
|
props: {
|
|
@@ -145,5 +143,5 @@ const _e = /* @__PURE__ */ P({
|
|
|
145
143
|
}
|
|
146
144
|
});
|
|
147
145
|
export {
|
|
148
|
-
|
|
146
|
+
Me as default
|
|
149
147
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as r, useAttrs as s, computed as c, createBlock as a, openBlock as l, resolveDynamicComponent as i, h as p, mergeProps as m, unref as u } from "vue";
|
|
2
|
-
import d from "
|
|
2
|
+
import d from "../../../assets/svg/addCircleLine.svg.js";
|
|
3
3
|
import f from "../index.vue.js";
|
|
4
4
|
const b = /* @__PURE__ */ r({
|
|
5
5
|
name: "TtSubIcon",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as r, useAttrs as s, computed as c, createBlock as a, openBlock as i, resolveDynamicComponent as l, h as m, mergeProps as p, unref as u } from "vue";
|
|
2
|
-
import f from "
|
|
2
|
+
import f from "../../../assets/svg/determinateCircleLine.svg.js";
|
|
3
3
|
import d from "../index.vue.js";
|
|
4
4
|
const I = /* @__PURE__ */ r({
|
|
5
5
|
name: "TtSubIcon",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineComponent as s, createBlock as n, openBlock as a, unref as e, mergeProps as p } from "vue";
|
|
2
2
|
import { useDesign as c } from "@dazhicheng/hooks";
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
import "../tt-table/index.js";
|
|
4
|
+
import { useTableRender as f } from "../tt-table/src/hooks/useTableRender.js";
|
|
5
|
+
const g = /* @__PURE__ */ s({
|
|
5
6
|
name: "TtLog",
|
|
6
7
|
__name: "index",
|
|
7
8
|
props: {
|
|
@@ -22,9 +23,9 @@ const _ = /* @__PURE__ */ s({
|
|
|
22
23
|
],
|
|
23
24
|
...o.tableProps
|
|
24
25
|
});
|
|
25
|
-
return (l,
|
|
26
|
+
return (l, m) => (a(), n(e(i), p({ class: e(r) }, l.$attrs), null, 16, ["class"]));
|
|
26
27
|
}
|
|
27
28
|
});
|
|
28
29
|
export {
|
|
29
|
-
|
|
30
|
+
g as default
|
|
30
31
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as he, ref as x, useAttrs as ke, useSlots as ve, getCurrentInstance as Te, computed as u, unref as o, watch as R, reactive as Ce, provide as ye, nextTick as Be, onMounted as Pe, onUnmounted as $e, withDirectives as Ie, createElementBlock as Oe, openBlock as Me, createVNode as k, mergeProps as j, h as
|
|
2
|
-
import { TtIcon as
|
|
3
|
-
import { useDesign as
|
|
4
|
-
import Le from "
|
|
1
|
+
import { defineComponent as he, ref as x, useAttrs as ke, useSlots as ve, getCurrentInstance as Te, computed as u, unref as o, watch as R, reactive as Ce, provide as ye, nextTick as Be, onMounted as Pe, onUnmounted as $e, withDirectives as Ie, createElementBlock as Oe, openBlock as Me, createVNode as k, mergeProps as j, h as we, createSlots as y, withCtx as c, normalizeClass as Se, renderSlot as p, renderList as B, normalizeProps as P, guardReactiveProps as $, createElementVNode as Fe } from "vue";
|
|
2
|
+
import { TtIcon as De } from "../../tt-icon/index.js";
|
|
3
|
+
import { useDesign as Ve, usePriorityValues as ze, getPriorityValues as Ae } from "@dazhicheng/hooks";
|
|
4
|
+
import Le from "../../../directives/dialog-resize/index.js";
|
|
5
5
|
import { generateTestId as I, toKebabCase as _e } from "@dazhicheng/utils";
|
|
6
6
|
import { useStore as xe } from "@tanstack/vue-store";
|
|
7
7
|
import { dialogProps as E, ElDialog as Re } from "element-plus";
|
|
@@ -12,8 +12,8 @@ import He from "./components/ModalWrapper.vue.js";
|
|
|
12
12
|
import { basicProps as We } from "./props.js";
|
|
13
13
|
import { ModalApi as Ne } from "./utils/modal-api.js";
|
|
14
14
|
import { pushModal as qe, removeModal as W } from "./utils/modal-stack.js";
|
|
15
|
-
import
|
|
16
|
-
const
|
|
15
|
+
import Ke from "../../../assets/svg/close.svg.js";
|
|
16
|
+
const Ue = ["aria-tt-id", "data-testid"], Ge = ["data-testid"], uo = /* @__PURE__ */ he({
|
|
17
17
|
name: "TtModal",
|
|
18
18
|
__name: "RenderModal",
|
|
19
19
|
props: {
|
|
@@ -26,9 +26,9 @@ const Ke = ["aria-tt-id", "data-testid"], Ue = ["data-testid"], uo = /* @__PURE_
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
emits: ["visible-change", "register", "update:visible"],
|
|
29
|
-
setup(N, { expose: q, emit:
|
|
29
|
+
setup(N, { expose: q, emit: K }) {
|
|
30
30
|
var L;
|
|
31
|
-
const n = N, v =
|
|
31
|
+
const n = N, v = K, f = x(), { prefixCls: U } = Ve("modal"), d = ke(), G = ve(), t = Te(), M = x(!1);
|
|
32
32
|
let a = n.modalApi;
|
|
33
33
|
if (!a) {
|
|
34
34
|
const e = n.okButtonProps ? {
|
|
@@ -45,13 +45,13 @@ const Ke = ["aria-tt-id", "data-testid"], Ue = ["data-testid"], uo = /* @__PURE_
|
|
|
45
45
|
}
|
|
46
46
|
const g = (L = a.useStore) == null ? void 0 : L.call(a), {
|
|
47
47
|
visible: T,
|
|
48
|
-
title:
|
|
49
|
-
width:
|
|
48
|
+
title: w,
|
|
49
|
+
width: S,
|
|
50
50
|
size: F,
|
|
51
51
|
fullscreen: J,
|
|
52
52
|
resizer: Q,
|
|
53
53
|
top: X,
|
|
54
|
-
isBottom:
|
|
54
|
+
isBottom: D,
|
|
55
55
|
draggable: Y,
|
|
56
56
|
showCancelBtn: Z,
|
|
57
57
|
okText: ee,
|
|
@@ -61,7 +61,7 @@ const Ke = ["aria-tt-id", "data-testid"], Ue = ["data-testid"], uo = /* @__PURE_
|
|
|
61
61
|
confirmLoading: se,
|
|
62
62
|
cancelLoading: re,
|
|
63
63
|
showOkBtn: ae,
|
|
64
|
-
loading:
|
|
64
|
+
loading: V,
|
|
65
65
|
height: ie,
|
|
66
66
|
showFooter: z,
|
|
67
67
|
loadingTip: le,
|
|
@@ -72,7 +72,7 @@ const Ke = ["aria-tt-id", "data-testid"], Ue = ["data-testid"], uo = /* @__PURE_
|
|
|
72
72
|
small: "592px",
|
|
73
73
|
medium: "876px"
|
|
74
74
|
};
|
|
75
|
-
return o(
|
|
75
|
+
return o(S) ? o(S) : e[o(F)] ? e[o(F)] : "500px";
|
|
76
76
|
}), ce = u(() => {
|
|
77
77
|
const e = Ae(ne), s = H(d, ["onVisibleChange", "onClose", "onClosed", "onOk", "onReceiveSharedData"]);
|
|
78
78
|
return {
|
|
@@ -86,7 +86,7 @@ const Ke = ["aria-tt-id", "data-testid"], Ue = ["data-testid"], uo = /* @__PURE_
|
|
|
86
86
|
// 禁用 element-plus 原生 ESC 关闭,改由 modal-stack 统一管理:
|
|
87
87
|
// 1. 多弹窗时逐个关闭;2. 表单聚焦时 ESC 不关闭弹窗
|
|
88
88
|
closeOnPressEscape: !1,
|
|
89
|
-
top: o(X) ?? o(
|
|
89
|
+
top: o(X) ?? o(D) ? "40px" : "15vh",
|
|
90
90
|
fullscreen: !1,
|
|
91
91
|
draggable: !1,
|
|
92
92
|
modalClass: `${e.modalClass || ""} tt-id-${t == null ? void 0 : t.uid}`
|
|
@@ -102,7 +102,7 @@ const Ke = ["aria-tt-id", "data-testid"], Ue = ["data-testid"], uo = /* @__PURE_
|
|
|
102
102
|
showOkBtn: o(ae)
|
|
103
103
|
})), A = u(() => {
|
|
104
104
|
var l, _;
|
|
105
|
-
const e = (l = o(b)) == null ? void 0 : l.disabled, s = o(
|
|
105
|
+
const e = (l = o(b)) == null ? void 0 : l.disabled, s = o(V), i = (_ = o(b)) == null ? void 0 : _.disabledTip, r = Array.isArray(i) ? i : i ? [i] : [];
|
|
106
106
|
return e || s ? [!0, r] : [!1, []];
|
|
107
107
|
});
|
|
108
108
|
R(
|
|
@@ -153,7 +153,7 @@ const Ke = ["aria-tt-id", "data-testid"], Ue = ["data-testid"], uo = /* @__PURE_
|
|
|
153
153
|
const i = me();
|
|
154
154
|
if (i)
|
|
155
155
|
return C(i);
|
|
156
|
-
const r = o(
|
|
156
|
+
const r = o(w);
|
|
157
157
|
return r && typeof r == "string" && r.trim() ? I("modal", _e(r)) : t != null && t.uid ? `modal-${t.uid}` : "modal";
|
|
158
158
|
}), ge = u(() => I(h.value, "footer")), be = u(() => I(h.value, "body"));
|
|
159
159
|
ye("modalIdContext", h);
|
|
@@ -190,11 +190,11 @@ const Ke = ["aria-tt-id", "data-testid"], Ue = ["data-testid"], uo = /* @__PURE_
|
|
|
190
190
|
"data-testid": h.value
|
|
191
191
|
}, [
|
|
192
192
|
k(o(Re), j(ce.value, {
|
|
193
|
-
class: ["tt-ui-modal", o(
|
|
193
|
+
class: ["tt-ui-modal", o(U)],
|
|
194
194
|
"before-close": o(a).onClosed,
|
|
195
|
-
"close-icon": () =>
|
|
195
|
+
"close-icon": () => we(o(De), {
|
|
196
196
|
size: 16,
|
|
197
|
-
icon: o(
|
|
197
|
+
icon: o(Ke),
|
|
198
198
|
isCustomSvg: !0
|
|
199
199
|
})
|
|
200
200
|
}), y({
|
|
@@ -202,11 +202,11 @@ const Ke = ["aria-tt-id", "data-testid"], Ue = ["data-testid"], uo = /* @__PURE_
|
|
|
202
202
|
k(He, {
|
|
203
203
|
ref_key: "modalWrapperRef",
|
|
204
204
|
ref: f,
|
|
205
|
-
"is-bottom": o(
|
|
205
|
+
"is-bottom": o(D),
|
|
206
206
|
height: o(ie),
|
|
207
|
-
loading: o(
|
|
207
|
+
loading: o(V),
|
|
208
208
|
"loading-tip": o(le),
|
|
209
|
-
class:
|
|
209
|
+
class: Se({ "pb-2!": !o(z) }),
|
|
210
210
|
"data-testid": be.value,
|
|
211
211
|
onIsScroll: pe
|
|
212
212
|
}, {
|
|
@@ -228,7 +228,7 @@ const Ke = ["aria-tt-id", "data-testid"], Ue = ["data-testid"], uo = /* @__PURE_
|
|
|
228
228
|
name: "header",
|
|
229
229
|
fn: c(() => [
|
|
230
230
|
k(Ee, {
|
|
231
|
-
title: o(
|
|
231
|
+
title: o(w),
|
|
232
232
|
onMousedown: fe
|
|
233
233
|
}, y({
|
|
234
234
|
titleToolbar: c(() => [
|
|
@@ -246,7 +246,7 @@ const Ke = ["aria-tt-id", "data-testid"], Ue = ["data-testid"], uo = /* @__PURE_
|
|
|
246
246
|
]),
|
|
247
247
|
key: "0"
|
|
248
248
|
},
|
|
249
|
-
o(
|
|
249
|
+
o(G).footer || o(z) ? {
|
|
250
250
|
name: "footer",
|
|
251
251
|
fn: c(() => [
|
|
252
252
|
p(e.$slots, "footer", {}, () => [
|
|
@@ -271,7 +271,7 @@ const Ke = ["aria-tt-id", "data-testid"], Ue = ["data-testid"], uo = /* @__PURE_
|
|
|
271
271
|
])
|
|
272
272
|
}))
|
|
273
273
|
]), 1040, ["style", "ok-button-props", "onFooterok", "onCancel"])
|
|
274
|
-
], 8,
|
|
274
|
+
], 8, Ge)
|
|
275
275
|
])
|
|
276
276
|
]),
|
|
277
277
|
key: "2"
|
|
@@ -294,7 +294,7 @@ const Ke = ["aria-tt-id", "data-testid"], Ue = ["data-testid"], uo = /* @__PURE_
|
|
|
294
294
|
])
|
|
295
295
|
}))
|
|
296
296
|
]), 1040, ["class", "before-close", "close-icon"])
|
|
297
|
-
], 8,
|
|
297
|
+
], 8, Ue)), [
|
|
298
298
|
[o(Le), {
|
|
299
299
|
draggable: o(Y),
|
|
300
300
|
fullscreen: o(J),
|
|
@@ -5,7 +5,7 @@ import { mergeWithArrayOverride as u, bindMethods as S, isElement as w, isFuncti
|
|
|
5
5
|
import { Store as C } from "@tanstack/vue-store";
|
|
6
6
|
import { useDebounceFn as k } from "@vueuse/core";
|
|
7
7
|
import { computed as y } from "vue";
|
|
8
|
-
import { GlobalConfig as D } from "
|
|
8
|
+
import { GlobalConfig as D } from "../../../../hooks/useSetup.js";
|
|
9
9
|
class x {
|
|
10
10
|
/** 构造函数,初始化弹窗的API接口和状态 */
|
|
11
11
|
constructor(t = {}) {
|
|
@@ -1,11 +1,34 @@
|
|
|
1
|
-
import { defineComponent as G, useSlots as H, ref as K, computed as F, toValue as J, nextTick as y, watch as Q, createBlock as C, openBlock as M, unref as
|
|
1
|
+
import { defineComponent as G, useSlots as H, ref as K, computed as F, toValue as J, nextTick as y, watch as Q, createBlock as C, openBlock as M, unref as d, createSlots as B, withCtx as A, renderSlot as h, createVNode as W, renderList as P, normalizeProps as S, guardReactiveProps as b, createCommentVNode as X } from "vue";
|
|
2
2
|
import { isFunction as c } from "@dazhicheng/utils";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
3
|
+
import { ElCheckbox as Y, ElMessage as V } from "element-plus";
|
|
4
|
+
import "../tt-select/index.js";
|
|
5
|
+
import "../tt-panel-select/index.js";
|
|
6
|
+
import "../tt-upload/index.js";
|
|
7
|
+
import "../tt-api-component/index.js";
|
|
8
|
+
import "vee-validate";
|
|
9
|
+
import { useForm as Z } from "../tt-form/src/useForm.js";
|
|
10
|
+
import "zod";
|
|
11
|
+
import { get as ee } from "lodash-es";
|
|
12
|
+
import "dayjs";
|
|
13
|
+
import "dayjs/plugin/timezone";
|
|
14
|
+
import "@tanstack/vue-store";
|
|
15
|
+
import "es-toolkit/compat";
|
|
16
|
+
import "../tt-form/src/shared/zod-defaults.js";
|
|
17
|
+
import "../tt-nav-anchor/index.js";
|
|
18
|
+
import "@dazhicheng/hooks";
|
|
19
|
+
import "../tt-icon/index.js";
|
|
20
|
+
import "../tt-form/src/components/Slot.js";
|
|
21
|
+
import "../tt-form-item-error-tooltip/index.js";
|
|
22
|
+
import "@vueuse/core";
|
|
23
|
+
/* empty css */
|
|
24
|
+
import "../tt-form/src/form/RenderContent.vue.js";
|
|
25
|
+
import "../tt-form/src/form-render/FormFieldContact.js";
|
|
26
|
+
/* empty css */
|
|
27
|
+
/* empty css */
|
|
28
|
+
import "../tt-modal/index.js";
|
|
29
|
+
import { useModalFormSlot as oe } from "./hooks/useModalFormSlot.js";
|
|
30
|
+
import { useModalRender as te } from "../tt-modal/src/hooks/useModalRender.js";
|
|
31
|
+
const De = /* @__PURE__ */ G({
|
|
9
32
|
name: "TtModalForm",
|
|
10
33
|
__name: "index",
|
|
11
34
|
props: {
|
|
@@ -31,10 +54,10 @@ const ue = /* @__PURE__ */ G({
|
|
|
31
54
|
emits: ["submit", "fetch", "getinfo"],
|
|
32
55
|
setup(I, { emit: O }) {
|
|
33
56
|
var k, w;
|
|
34
|
-
const o = I,
|
|
57
|
+
const o = I, m = O, D = H(), f = K(), s = K(!1), { getFormSlotKeys: L, getModalSlotKeys: E, replaceFormSlotKey: R, replaceModalSlotKey: _ } = oe(D), x = F(() => E.value.filter(Boolean)), T = F(() => L.value.filter(Boolean)), [$, l] = Z({
|
|
35
58
|
showDefaultActions: !1,
|
|
36
59
|
...J(o.formProps)
|
|
37
|
-
}), [z, a] =
|
|
60
|
+
}), [z, a] = te({
|
|
38
61
|
...o.modalProps,
|
|
39
62
|
onReceiveSharedData: async (e) => {
|
|
40
63
|
if (!e) {
|
|
@@ -52,8 +75,8 @@ const ue = /* @__PURE__ */ G({
|
|
|
52
75
|
const t = {
|
|
53
76
|
...o.infoApiParams,
|
|
54
77
|
[o.infoApiIdKey]: e[o.infoApiIdKey]
|
|
55
|
-
}, n = c(o.infoApiBefore) ? await o.infoApiBefore(t) : t, r = await i(n),
|
|
56
|
-
g(u),
|
|
78
|
+
}, n = c(o.infoApiBefore) ? await o.infoApiBefore(t) : t, r = await i(n), p = o.dataField ? ee(r, o.dataField) : r, u = c(o.infoApiAfter) ? await o.infoApiAfter(p) : p;
|
|
79
|
+
g(u), m("getinfo", u), await y(), await l.resetForm({ values: u });
|
|
57
80
|
} finally {
|
|
58
81
|
a.changeLoading(!1);
|
|
59
82
|
}
|
|
@@ -77,10 +100,10 @@ const ue = /* @__PURE__ */ G({
|
|
|
77
100
|
const n = (u = o.checkedOptions) == null ? void 0 : u[t];
|
|
78
101
|
if (!Array.isArray(n) || n.length === 0)
|
|
79
102
|
return;
|
|
80
|
-
const [r,
|
|
81
|
-
!r || !
|
|
103
|
+
const [r, p] = n.length === 1 ? [n[0], n[0]] : n;
|
|
104
|
+
!r || !p || (e[t] = {
|
|
82
105
|
label: e[r],
|
|
83
|
-
value: e[
|
|
106
|
+
value: e[p]
|
|
84
107
|
});
|
|
85
108
|
});
|
|
86
109
|
}
|
|
@@ -94,14 +117,14 @@ const ue = /* @__PURE__ */ G({
|
|
|
94
117
|
}
|
|
95
118
|
async function j(e, i) {
|
|
96
119
|
const { editApi: t } = o;
|
|
97
|
-
!t || !c(t) || (e[o.infoApiIdKey] = f.value, await t(e, i.files), V.success("修改成功"),
|
|
120
|
+
!t || !c(t) || (e[o.infoApiIdKey] = f.value, await t(e, i.files), V.success("修改成功"), m("submit", {
|
|
98
121
|
...e,
|
|
99
122
|
continuousChecked: s.value
|
|
100
123
|
}), a.closeModal());
|
|
101
124
|
}
|
|
102
125
|
async function U(e, i) {
|
|
103
126
|
const { addApi: t } = o;
|
|
104
|
-
!t || !c(t) || (await t(e, i.files), V.success("新增成功"),
|
|
127
|
+
!t || !c(t) || (await t(e, i.files), V.success("新增成功"), m("submit", {
|
|
105
128
|
...e,
|
|
106
129
|
continuousChecked: s.value
|
|
107
130
|
}), (!s.value || !o.isContinuousChecked) && a.closeModal());
|
|
@@ -116,7 +139,7 @@ const ue = /* @__PURE__ */ G({
|
|
|
116
139
|
return;
|
|
117
140
|
const { addApi: n, editApi: r } = o;
|
|
118
141
|
if (!n && !r) {
|
|
119
|
-
|
|
142
|
+
m("submit", {
|
|
120
143
|
...i,
|
|
121
144
|
[o.infoApiIdKey]: f.value,
|
|
122
145
|
continuousChecked: s.value
|
|
@@ -137,13 +160,13 @@ const ue = /* @__PURE__ */ G({
|
|
|
137
160
|
if (e) {
|
|
138
161
|
await y();
|
|
139
162
|
const i = await l.getValues();
|
|
140
|
-
|
|
163
|
+
m("fetch", i);
|
|
141
164
|
} else
|
|
142
165
|
s.value = !1;
|
|
143
166
|
}
|
|
144
|
-
), (e, i) => (M(), C(
|
|
167
|
+
), (e, i) => (M(), C(d(z), null, B({
|
|
145
168
|
insertFooter: A(() => [
|
|
146
|
-
o.isContinuousChecked && !f.value ? (M(), C(
|
|
169
|
+
o.isContinuousChecked && !f.value ? (M(), C(d(Y), {
|
|
147
170
|
key: 0,
|
|
148
171
|
modelValue: s.value,
|
|
149
172
|
"onUpdate:modelValue": i[0] || (i[0] = (t) => s.value = t),
|
|
@@ -153,9 +176,9 @@ const ue = /* @__PURE__ */ G({
|
|
|
153
176
|
]),
|
|
154
177
|
default: A(() => [
|
|
155
178
|
h(e.$slots, "BasicMsgTop"),
|
|
156
|
-
W(
|
|
179
|
+
W(d($), null, B({ _: 2 }, [
|
|
157
180
|
P(T.value, (t) => ({
|
|
158
|
-
name:
|
|
181
|
+
name: d(R)(t),
|
|
159
182
|
fn: A((n) => [
|
|
160
183
|
h(e.$slots, t, S(b(n)))
|
|
161
184
|
])
|
|
@@ -165,7 +188,7 @@ const ue = /* @__PURE__ */ G({
|
|
|
165
188
|
_: 2
|
|
166
189
|
}, [
|
|
167
190
|
P(x.value, (t) => ({
|
|
168
|
-
name:
|
|
191
|
+
name: d(_)(t),
|
|
169
192
|
fn: A((n) => [
|
|
170
193
|
h(e.$slots, t, S(b(n)))
|
|
171
194
|
])
|
|
@@ -174,5 +197,5 @@ const ue = /* @__PURE__ */ G({
|
|
|
174
197
|
}
|
|
175
198
|
});
|
|
176
199
|
export {
|
|
177
|
-
|
|
200
|
+
De as default
|
|
178
201
|
};
|