@dazhicheng/ui 1.6.41 → 1.6.42
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/download.svg.js +1 -1
- package/dist/components/tt-api-component/index.vue2.js +73 -73
- package/dist/components/tt-area/TtArea.vue.js +1 -1
- package/dist/components/tt-button/index.d.ts +91 -105
- package/dist/components/tt-button/index.vue.d.ts +52 -60
- package/dist/components/tt-button/index.vue2.js +1 -1
- package/dist/components/tt-drawer/index.d.ts +352 -326
- package/dist/components/tt-drawer/src/RenderDrawer.vue.d.ts +196 -184
- package/dist/components/tt-drawer/src/RenderDrawer.vue.js +1 -1
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +1 -1
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
- package/dist/components/tt-empty/index.d.ts +4 -4
- package/dist/components/tt-empty/index.js +1 -1
- package/dist/components/tt-form/index.js +1 -1
- package/dist/components/tt-form/src/components/FormActions.vue2.js +1 -1
- package/dist/components/tt-form/src/components/FormElInput.vue.d.ts +106 -110
- package/dist/components/tt-form/src/form/FormMessageToolTip.vue.js +12 -12
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +164 -164
- package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +34 -34
- package/dist/components/tt-form/src/form-render/expandable.js +18 -18
- package/dist/components/tt-form/src/form-render/form.vue2.js +1 -1
- package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +1 -1
- package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +124 -124
- package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +99 -99
- package/dist/components/tt-form/src/index.vue.d.ts +8 -12
- package/dist/components/tt-form/src/index.vue2.js +1 -1
- package/dist/components/tt-form-item-error-tooltip/index.d.ts +30 -126
- package/dist/components/tt-form-item-error-tooltip/index.vue.d.ts +15 -63
- package/dist/components/tt-icon/components/AddIcon.vue.js +6 -6
- package/dist/components/tt-icon/components/SubIcon.vue.js +6 -6
- package/dist/components/tt-icon/index.d.ts +4 -4
- package/dist/components/tt-icon/index.vue.js +2 -2
- package/dist/components/tt-icon/index.vue2.js +28 -28
- package/dist/components/tt-image/index.d.ts +29 -29
- package/dist/components/tt-image/src/components/ImageViewer.d.ts +20 -20
- package/dist/components/tt-image/tt-image.d.ts +29 -29
- package/dist/components/tt-input-textarea/index.vue.d.ts +424 -440
- package/dist/components/tt-input-textarea/index.vue.js +153 -153
- package/dist/components/tt-loading/src/loading.vue.js +2 -2
- package/dist/components/tt-loading/src/loading.vue2.js +22 -22
- package/dist/components/tt-log/index.vue.js +1 -1
- package/dist/components/tt-modal/index.d.ts +182 -162
- package/dist/components/tt-modal/src/RenderModal.vue.d.ts +54 -54
- package/dist/components/tt-modal/src/RenderModal.vue.js +236 -228
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +1 -1
- package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +26 -22
- package/dist/components/tt-modal/src/utils/resolve-modal-target.js +57 -53
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +123 -123
- package/dist/components/tt-panel-select/src/components/PanelLeft.vue.js +24 -24
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +63 -67
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.js +145 -145
- package/dist/components/tt-panel-select/src/components/PanelRight.vue.d.ts +10 -12
- package/dist/components/tt-panel-select/src/components/PanelRight.vue.js +48 -48
- package/dist/components/tt-panel-select/src/index.vue.d.ts +63 -67
- package/dist/components/tt-panel-select/src/index.vue.js +137 -137
- package/dist/components/tt-radio-group/index.vue.js +1 -1
- package/dist/components/tt-select/src/Select.vue.d.ts +8 -12
- package/dist/components/tt-select/src/Select.vue.js +1 -1
- package/dist/components/tt-select/src/components/SelectTable.vue.js +1 -1
- package/dist/components/tt-select/src/components/Table.vue.js +1 -1
- package/dist/components/tt-table/index.d.ts +20 -24
- package/dist/components/tt-table/index.js +1 -1
- package/dist/components/tt-table/src/Table.vue.d.ts +40 -48
- package/dist/components/tt-table/src/Table.vue.js +1 -1
- package/dist/components/tt-table/src/TableForm.vue.d.ts +8 -12
- package/dist/components/tt-table/src/TableForm.vue.js +1 -1
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +1 -1
- package/dist/components/tt-table/src/hooks/useSideSlot.d.ts +40 -48
- package/dist/components/tt-text/index.vue2.js +22 -22
- package/dist/components/tt-upload/index.d.ts +60 -60
- package/dist/components/tt-upload/src/TtUpload.vue.d.ts +37 -37
- package/dist/components/tt-upload/src/TtUpload.vue.js +1 -1
- package/dist/components/tt-upload/src/typing.d.ts +17 -17
- package/dist/hooks/useScreenshotOss.js +1 -1
- package/dist/packages/hooks/src/propTypes.js +1 -1
- package/dist/plugins/vxeTable/switchStatus.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- /package/dist/node_modules/.pnpm/{vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_ → vue-types@5.1.3_vue@3.5.34_typescript@5.9.3_}/node_modules/vue-types/shim/index.modern.js +0 -0
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { defineComponent as he, useTemplateRef as H, unref as o, computed as a, reactive as be, markRaw as ye, toRaw as C, watch as J, nextTick as Ce, onUnmounted as ge, createBlock as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as he, useTemplateRef as H, unref as o, computed as a, reactive as be, markRaw as ye, toRaw as C, watch as J, nextTick as Ce, onUnmounted as ge, createBlock as v, createCommentVNode as d, openBlock as m, mergeProps as O, withCtx as p, withDirectives as Fe, createVNode as g, createElementVNode as L, createElementBlock as Q, normalizeClass as w, normalizeStyle as X, renderSlot as xe, normalizeProps as Se, guardReactiveProps as Ne, resolveDynamicComponent as Re, createSlots as ke, renderList as Oe, Transition as we, vShow as Ee } from "vue";
|
|
2
|
+
import Pe from "../form/FormControl.vue.js";
|
|
3
|
+
import Te from "../form/FormDescription.vue.js";
|
|
4
|
+
import Be from "../form/FormItem.vue.js";
|
|
5
5
|
import "axios";
|
|
6
6
|
import "element-plus";
|
|
7
|
-
import { isString as h, isFunction as
|
|
7
|
+
import { isString as h, isFunction as $, isObject as Ve } from "../../../../packages/utils/src/is.js";
|
|
8
8
|
import "dayjs";
|
|
9
9
|
import "numeral";
|
|
10
|
-
import { clnm as
|
|
10
|
+
import { clnm as q } from "../../../../packages/utils/src/tool.js";
|
|
11
11
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
12
12
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
13
13
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
14
14
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
15
15
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
16
|
-
import { set as
|
|
17
|
-
import
|
|
18
|
-
import
|
|
16
|
+
import { set as Ie, get as Le } from "lodash-es";
|
|
17
|
+
import $e from "../form/FormMessageToolTip.vue.js";
|
|
18
|
+
import qe from "../form/FormMessage.vue.js";
|
|
19
19
|
import "../../../tt-icon/index.js";
|
|
20
20
|
import "@vueuse/core";
|
|
21
|
-
import { useFormValues as
|
|
21
|
+
import { useFormValues as je, useFieldError as Ae, Field as Me } from "vee-validate";
|
|
22
22
|
/* empty css */
|
|
23
|
-
import
|
|
24
|
-
import { toTypedSchema as
|
|
25
|
-
import { injectFormProps as
|
|
26
|
-
import { useFormContext as
|
|
23
|
+
import E from "../form/RenderContent.vue.js";
|
|
24
|
+
import { toTypedSchema as Ue } from "@vee-validate/zod";
|
|
25
|
+
import { injectFormProps as De, injectComponentRefMap as We } from "../useFormContext.js";
|
|
26
|
+
import { useFormContext as ze, injectRenderFormProps as Ke } from "./context.js";
|
|
27
27
|
import Ge, { resolveRequiredRuleName as He } from "./dependencies.js";
|
|
28
28
|
import Je from "./FormLabel.vue2.js";
|
|
29
29
|
import { useSelectCollapseOptions as Qe } from "../hooks/useSelectCollapse.js";
|
|
@@ -31,7 +31,7 @@ import { isEventObjectLike as Y } from "./helper.js";
|
|
|
31
31
|
const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
32
32
|
key: 0,
|
|
33
33
|
class: "ml-1"
|
|
34
|
-
},
|
|
34
|
+
}, wt = /* @__PURE__ */ he({
|
|
35
35
|
__name: "FormField",
|
|
36
36
|
props: {
|
|
37
37
|
component: {},
|
|
@@ -67,19 +67,19 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
67
67
|
wrapperClass: {},
|
|
68
68
|
commonComponentProps: {}
|
|
69
69
|
},
|
|
70
|
-
setup(
|
|
71
|
-
const
|
|
72
|
-
var
|
|
73
|
-
return ((
|
|
74
|
-
}),
|
|
70
|
+
setup(e) {
|
|
71
|
+
const P = H("wrapperRef"), { componentBindEventMap: Z, componentMap: _, isVertical: b } = ze(), ee = Ke(), N = je(), te = Ae(e.fieldName), s = H("fieldComponentRef"), [ne, oe] = De(), j = o(ne).formApi, F = a(() => ee.compact), x = a(() => {
|
|
72
|
+
var t;
|
|
73
|
+
return ((t = te.value) == null ? void 0 : t.length) > 0;
|
|
74
|
+
}), T = be(
|
|
75
75
|
new Proxy({}, {
|
|
76
76
|
/**
|
|
77
77
|
* @param _target 代理目标(空对象,不实际存储)
|
|
78
78
|
* @param key 属性名
|
|
79
79
|
* @returns 当前表单值
|
|
80
80
|
*/
|
|
81
|
-
get(
|
|
82
|
-
return
|
|
81
|
+
get(t, n) {
|
|
82
|
+
return Le(N.value, n);
|
|
83
83
|
},
|
|
84
84
|
/**
|
|
85
85
|
* @param _target 代理目标
|
|
@@ -87,164 +87,164 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
87
87
|
* @param value 新值
|
|
88
88
|
* @returns 是否设置成功
|
|
89
89
|
*/
|
|
90
|
-
set(
|
|
91
|
-
return
|
|
90
|
+
set(t, n, l) {
|
|
91
|
+
return Ie(N.value, n, l), oe.validateField(n, { warn: !1 }), !0;
|
|
92
92
|
}
|
|
93
93
|
})
|
|
94
|
-
),
|
|
95
|
-
const
|
|
96
|
-
return ye(C(
|
|
97
|
-
}), { dynamicComponentProps: le, dynamicRules: ie, isDisabled: ae, isIf:
|
|
98
|
-
() =>
|
|
94
|
+
), A = a(() => {
|
|
95
|
+
const t = h(e.component) ? _.value[e.component] : e.component;
|
|
96
|
+
return ye(C(t));
|
|
97
|
+
}), { dynamicComponentProps: le, dynamicRules: ie, isDisabled: ae, isIf: M, isRequired: B, isShow: U } = Ge(
|
|
98
|
+
() => e.dependencies
|
|
99
99
|
), re = a(() => {
|
|
100
|
-
var
|
|
101
|
-
return (
|
|
102
|
-
width: `${
|
|
100
|
+
var t;
|
|
101
|
+
return (t = e.labelClass) != null && t.includes("w-") || b.value ? {} : {
|
|
102
|
+
width: `${e.labelWidth}px`
|
|
103
103
|
};
|
|
104
|
-
}),
|
|
105
|
-
const
|
|
106
|
-
return
|
|
107
|
-
}),
|
|
108
|
-
var r,
|
|
109
|
-
if (!
|
|
104
|
+
}), D = a(() => {
|
|
105
|
+
const t = ie.value || e.rules;
|
|
106
|
+
return t && C(t);
|
|
107
|
+
}), W = a(() => !e.hide && M.value && U.value), V = a(() => {
|
|
108
|
+
var r, S, u;
|
|
109
|
+
if (!W.value)
|
|
110
110
|
return !1;
|
|
111
|
-
const
|
|
112
|
-
if (!
|
|
113
|
-
return
|
|
114
|
-
if (
|
|
111
|
+
const t = D.value;
|
|
112
|
+
if (!t)
|
|
113
|
+
return B.value;
|
|
114
|
+
if (B.value)
|
|
115
115
|
return !0;
|
|
116
|
-
if (h(
|
|
117
|
-
return ["required", "selectRequired"].includes(
|
|
118
|
-
const n = C(
|
|
116
|
+
if (h(t))
|
|
117
|
+
return ["required", "selectRequired"].includes(t);
|
|
118
|
+
const n = C(t);
|
|
119
119
|
let l = (r = n == null ? void 0 : n.isOptional) == null ? void 0 : r.call(n);
|
|
120
120
|
const i = n == null ? void 0 : n.def;
|
|
121
121
|
if ((i == null ? void 0 : i.type) === "default" && "innerType" in i) {
|
|
122
|
-
const
|
|
123
|
-
|
|
122
|
+
const k = i.innerType;
|
|
123
|
+
k && (l = (u = (S = C(k)).isOptional) == null ? void 0 : u.call(S));
|
|
124
124
|
}
|
|
125
125
|
return !l;
|
|
126
126
|
}), ue = a(() => {
|
|
127
127
|
var i;
|
|
128
|
-
if (!
|
|
128
|
+
if (!W.value)
|
|
129
129
|
return null;
|
|
130
|
-
const
|
|
131
|
-
if (!
|
|
132
|
-
return
|
|
133
|
-
if (h(
|
|
134
|
-
return
|
|
135
|
-
let n = C(
|
|
136
|
-
if (!!
|
|
130
|
+
const t = D.value;
|
|
131
|
+
if (!t)
|
|
132
|
+
return B.value ? He(A.value) : null;
|
|
133
|
+
if (h(t))
|
|
134
|
+
return t;
|
|
135
|
+
let n = C(t);
|
|
136
|
+
if (!!V.value) {
|
|
137
137
|
const r = (i = n == null ? void 0 : n.unwrap) == null ? void 0 : i.call(n);
|
|
138
138
|
r && (n = C(r));
|
|
139
139
|
}
|
|
140
|
-
return
|
|
141
|
-
}),
|
|
142
|
-
const
|
|
140
|
+
return Ue(n);
|
|
141
|
+
}), c = a(() => {
|
|
142
|
+
const t = $(e.componentProps) ? e.componentProps(N.value, j) : e.componentProps;
|
|
143
143
|
return {
|
|
144
|
-
...
|
|
145
|
-
...
|
|
144
|
+
...e.commonComponentProps,
|
|
145
|
+
...t,
|
|
146
146
|
...le.value
|
|
147
147
|
};
|
|
148
|
-
}), { selectComponentProps:
|
|
148
|
+
}), { selectComponentProps: ce } = Qe(
|
|
149
149
|
a(() => ({
|
|
150
|
-
componentProps:
|
|
151
|
-
component:
|
|
152
|
-
selectWrapRef:
|
|
153
|
-
selectRef:
|
|
150
|
+
componentProps: c,
|
|
151
|
+
component: e.component,
|
|
152
|
+
selectWrapRef: P,
|
|
153
|
+
selectRef: s
|
|
154
154
|
}))
|
|
155
155
|
);
|
|
156
156
|
J(
|
|
157
157
|
() => {
|
|
158
|
-
var
|
|
159
|
-
return (
|
|
158
|
+
var t;
|
|
159
|
+
return (t = c.value) == null ? void 0 : t.autofocus;
|
|
160
160
|
},
|
|
161
|
-
(
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
(t) => {
|
|
162
|
+
t === !0 && Ce(() => {
|
|
163
|
+
pe();
|
|
164
164
|
});
|
|
165
165
|
},
|
|
166
166
|
{ immediate: !0 }
|
|
167
167
|
);
|
|
168
|
-
const
|
|
169
|
-
var
|
|
170
|
-
return ae.value ||
|
|
171
|
-
}),
|
|
172
|
-
const
|
|
168
|
+
const R = a(() => {
|
|
169
|
+
var t;
|
|
170
|
+
return ae.value || e.disabled || ((t = c.value) == null ? void 0 : t.disabled);
|
|
171
|
+
}), z = a(() => $(e.renderComponentContent) ? e.renderComponentContent(N.value, j) : {}), me = a(() => Object.keys(z.value)), de = a(() => {
|
|
172
|
+
const t = ue.value;
|
|
173
173
|
return {
|
|
174
174
|
keepValue: !0,
|
|
175
|
-
label: h(
|
|
176
|
-
...
|
|
177
|
-
...
|
|
175
|
+
label: h(e.label) ? e.label : "",
|
|
176
|
+
...t ? { rules: t } : {},
|
|
177
|
+
...e.formFieldProps
|
|
178
178
|
};
|
|
179
179
|
});
|
|
180
|
-
function
|
|
181
|
-
var
|
|
182
|
-
const n =
|
|
180
|
+
function se(t) {
|
|
181
|
+
var S;
|
|
182
|
+
const n = t.componentField.modelValue, l = t.componentField["onUpdate:modelValue"], i = e.modelPropName || (h(e.component) ? (S = Z.value) == null ? void 0 : S[e.component] : null);
|
|
183
183
|
let r = n;
|
|
184
|
-
if (n &&
|
|
184
|
+
if (n && Ve(n) && i) {
|
|
185
185
|
const u = n.target;
|
|
186
186
|
r = Y(n) ? u == null ? void 0 : u[i] : (n == null ? void 0 : n[i]) ?? n;
|
|
187
187
|
}
|
|
188
188
|
return i ? {
|
|
189
189
|
[`onUpdate:${i}`]: l,
|
|
190
|
-
[i]: r === void 0 ?
|
|
191
|
-
onChange:
|
|
190
|
+
[i]: r === void 0 ? e.emptyStateValue : r,
|
|
191
|
+
onChange: e.disabledOnChangeListener ? void 0 : (u) => {
|
|
192
192
|
var G;
|
|
193
|
-
const
|
|
194
|
-
if (!
|
|
193
|
+
const k = Y(u), y = (G = t == null ? void 0 : t.componentField) == null ? void 0 : G.onChange;
|
|
194
|
+
if (!k)
|
|
195
195
|
return y == null ? void 0 : y(u);
|
|
196
|
-
const
|
|
197
|
-
return y == null ? void 0 : y((
|
|
196
|
+
const I = u.target;
|
|
197
|
+
return y == null ? void 0 : y((I == null ? void 0 : I[i]) ?? u);
|
|
198
198
|
},
|
|
199
|
-
...
|
|
199
|
+
...e.disabledOnInputListener ? { onInput: void 0 } : {}
|
|
200
200
|
} : {
|
|
201
|
-
...
|
|
202
|
-
...
|
|
201
|
+
...e.disabledOnInputListener ? { onInput: void 0 } : {},
|
|
202
|
+
...e.disabledOnChangeListener ? { onChange: void 0 } : {}
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
const fe = /* @__PURE__ */ new Set(["ElCheckbox", "ElCheckboxButton", "ElSwitch"]),
|
|
206
|
-
function K(
|
|
207
|
-
const n =
|
|
208
|
-
...
|
|
209
|
-
...
|
|
210
|
-
...
|
|
205
|
+
const fe = /* @__PURE__ */ new Set(["ElCheckbox", "ElCheckboxButton", "ElSwitch"]), ve = /* @__PURE__ */ new Set(["ElInputNumber"]);
|
|
206
|
+
function K(t) {
|
|
207
|
+
const n = se(t), l = {
|
|
208
|
+
...t.componentField,
|
|
209
|
+
...c.value,
|
|
210
|
+
...ce.value,
|
|
211
211
|
...n,
|
|
212
|
-
...Reflect.has(
|
|
213
|
-
...Reflect.has(
|
|
212
|
+
...Reflect.has(c.value, "onChange") ? { onChange: c.value.onChange } : {},
|
|
213
|
+
...Reflect.has(c.value, "onInput") ? { onInput: c.value.onInput } : {}
|
|
214
214
|
};
|
|
215
|
-
return Reflect.has(
|
|
215
|
+
return Reflect.has(c.value, "name") || delete l.name, h(e.component) && fe.has(e.component) && l.modelValue === void 0 && (l.modelValue = !1), h(e.component) && ve.has(e.component) && (l.controls = !1, l.align = "left"), {
|
|
216
216
|
...l,
|
|
217
|
-
placeholder:
|
|
217
|
+
placeholder: R.value ? "" : l.placeholder
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
var
|
|
222
|
-
|
|
223
|
-
document.activeElement !==
|
|
220
|
+
function pe() {
|
|
221
|
+
var t, n;
|
|
222
|
+
s.value && $(s.value.focus) && // 检查当前是否有元素被聚焦
|
|
223
|
+
document.activeElement !== s.value && ((n = (t = s.value) == null ? void 0 : t.focus) == null || n.call(t));
|
|
224
224
|
}
|
|
225
|
-
const f =
|
|
226
|
-
return J(
|
|
227
|
-
f == null || f.set(
|
|
225
|
+
const f = We();
|
|
226
|
+
return J(s, (t) => {
|
|
227
|
+
f == null || f.set(e.fieldName, t);
|
|
228
228
|
}), ge(() => {
|
|
229
|
-
f != null && f.has(
|
|
230
|
-
}), (
|
|
231
|
-
default:
|
|
232
|
-
Fe(g(o(
|
|
229
|
+
f != null && f.has(e.fieldName) && f.delete(e.fieldName);
|
|
230
|
+
}), (t, n) => !e.hide && o(M) ? (m(), v(o(Me), O({ key: 0 }, de.value, { name: e.fieldName }), {
|
|
231
|
+
default: p((l) => [
|
|
232
|
+
Fe(g(o(Be), O({
|
|
233
233
|
class: [{
|
|
234
|
-
"form-valid-error":
|
|
235
|
-
"form-is-required":
|
|
234
|
+
"form-valid-error": x.value,
|
|
235
|
+
"form-is-required": V.value,
|
|
236
236
|
"pb-(--form-valid-error-nocompact-padding-bottom)": !F.value,
|
|
237
237
|
"pb-2": F.value
|
|
238
238
|
}, "relative"]
|
|
239
|
-
},
|
|
240
|
-
default:
|
|
241
|
-
|
|
242
|
-
class:
|
|
239
|
+
}, t.$attrs), {
|
|
240
|
+
default: p(() => [
|
|
241
|
+
L("div", {
|
|
242
|
+
class: w([{ "flex-col": o(b), "flex-row items-center": !o(b) }, "flex"])
|
|
243
243
|
}, [
|
|
244
|
-
e.hideLabel ?
|
|
244
|
+
e.hideLabel ? d("", !0) : (m(), v(Je, {
|
|
245
245
|
key: 0,
|
|
246
|
-
class:
|
|
247
|
-
o(
|
|
246
|
+
class: w(
|
|
247
|
+
o(q)(
|
|
248
248
|
"flex leading-6",
|
|
249
249
|
{
|
|
250
250
|
"mr-2 shrink-0 items-center justify-end": !o(b),
|
|
@@ -256,54 +256,54 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
256
256
|
help: e.help,
|
|
257
257
|
colon: e.colon,
|
|
258
258
|
label: e.label,
|
|
259
|
-
required:
|
|
259
|
+
required: V.value && !e.hideRequiredMark,
|
|
260
260
|
style: X(re.value),
|
|
261
261
|
"tool-tip": e.toolTip,
|
|
262
262
|
"help-trigger": e.helpTrigger,
|
|
263
|
-
form:
|
|
263
|
+
form: T,
|
|
264
264
|
"tool-tip-text": e.toolTipText
|
|
265
265
|
}, {
|
|
266
|
-
default:
|
|
267
|
-
e.label ? (m(),
|
|
266
|
+
default: p(() => [
|
|
267
|
+
e.label ? (m(), v(o(E), {
|
|
268
268
|
key: 0,
|
|
269
269
|
content: e.label
|
|
270
|
-
}, null, 8, ["content"])) :
|
|
270
|
+
}, null, 8, ["content"])) : d("", !0)
|
|
271
271
|
]),
|
|
272
272
|
_: 1
|
|
273
273
|
}, 8, ["class", "help", "colon", "label", "required", "style", "tool-tip", "help-trigger", "form", "tool-tip-text"])),
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
L("div", Xe, [
|
|
275
|
+
L("div", {
|
|
276
276
|
ref_key: "wrapperRef",
|
|
277
|
-
ref:
|
|
278
|
-
class:
|
|
277
|
+
ref: P,
|
|
278
|
+
class: w(o(q)("relative flex w-full items-center", e.wrapperClass))
|
|
279
279
|
}, [
|
|
280
|
-
g(o(
|
|
281
|
-
class:
|
|
280
|
+
g(o(Pe), {
|
|
281
|
+
class: w(o(q)(e.controlClass))
|
|
282
282
|
}, {
|
|
283
|
-
default:
|
|
284
|
-
|
|
283
|
+
default: p(() => [
|
|
284
|
+
xe(t.$slots, "default", Se(Ne({
|
|
285
285
|
...l,
|
|
286
286
|
...K(l),
|
|
287
|
-
disabled:
|
|
288
|
-
isInValid:
|
|
289
|
-
form:
|
|
287
|
+
disabled: R.value,
|
|
288
|
+
isInValid: x.value,
|
|
289
|
+
form: T,
|
|
290
290
|
fieldName: e.fieldName
|
|
291
291
|
})), () => [
|
|
292
|
-
(m(),
|
|
292
|
+
(m(), v(Re(A.value), O({
|
|
293
293
|
ref_key: "fieldComponentRef",
|
|
294
|
-
ref:
|
|
294
|
+
ref: s
|
|
295
295
|
}, {
|
|
296
296
|
...K(l),
|
|
297
|
-
disabled:
|
|
298
|
-
isInValid:
|
|
299
|
-
form:
|
|
297
|
+
disabled: R.value,
|
|
298
|
+
isInValid: x.value,
|
|
299
|
+
form: T,
|
|
300
300
|
fieldName: e.fieldName
|
|
301
|
-
}, { disabled:
|
|
302
|
-
|
|
301
|
+
}, { disabled: R.value }), ke({ _: 2 }, [
|
|
302
|
+
Oe(me.value, (i) => ({
|
|
303
303
|
name: i,
|
|
304
|
-
fn:
|
|
305
|
-
g(o(
|
|
306
|
-
content:
|
|
304
|
+
fn: p((r) => [
|
|
305
|
+
g(o(E), O({
|
|
306
|
+
content: z.value[i]
|
|
307
307
|
}, { ...r, formContext: l }), null, 16, ["content"])
|
|
308
308
|
])
|
|
309
309
|
}))
|
|
@@ -313,12 +313,12 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
313
313
|
_: 2
|
|
314
314
|
}, 1032, ["class"]),
|
|
315
315
|
e.suffix ? (m(), Q("div", Ye, [
|
|
316
|
-
g(o(
|
|
317
|
-
])) :
|
|
318
|
-
F.value &&
|
|
316
|
+
g(o(E), { content: e.suffix }, null, 8, ["content"])
|
|
317
|
+
])) : d("", !0),
|
|
318
|
+
F.value && x.value ? (m(), v(o($e), {
|
|
319
319
|
key: 1,
|
|
320
|
-
"ref-dom":
|
|
321
|
-
}, null, 8, ["ref-dom"])) :
|
|
320
|
+
"ref-dom": P.value
|
|
321
|
+
}, null, 8, ["ref-dom"])) : d("", !0)
|
|
322
322
|
], 2)
|
|
323
323
|
])
|
|
324
324
|
], 2),
|
|
@@ -326,35 +326,35 @@ const Xe = { class: "flex-auto overflow-hidden" }, Ye = {
|
|
|
326
326
|
key: 0,
|
|
327
327
|
style: X(!o(b) && !e.hideLabel ? { paddingLeft: `${(e.labelWidth || 0) + 8}px` } : {})
|
|
328
328
|
}, [
|
|
329
|
-
e.description ? (m(),
|
|
329
|
+
e.description ? (m(), v(o(Te), {
|
|
330
330
|
key: 0,
|
|
331
331
|
class: "text-[12px]"
|
|
332
332
|
}, {
|
|
333
|
-
default:
|
|
334
|
-
g(o(
|
|
333
|
+
default: p(() => [
|
|
334
|
+
g(o(E), { content: e.description }, null, 8, ["content"])
|
|
335
335
|
]),
|
|
336
336
|
_: 1
|
|
337
|
-
})) :
|
|
338
|
-
g(
|
|
339
|
-
default:
|
|
340
|
-
!F.value &&
|
|
337
|
+
})) : d("", !0),
|
|
338
|
+
g(we, { name: "slide-up" }, {
|
|
339
|
+
default: p(() => [
|
|
340
|
+
!F.value && x.value ? (m(), v(o(qe), {
|
|
341
341
|
key: 0,
|
|
342
342
|
class: "absolute"
|
|
343
|
-
})) :
|
|
343
|
+
})) : d("", !0)
|
|
344
344
|
]),
|
|
345
345
|
_: 1
|
|
346
346
|
})
|
|
347
|
-
], 4)) :
|
|
347
|
+
], 4)) : d("", !0)
|
|
348
348
|
]),
|
|
349
349
|
_: 2
|
|
350
350
|
}, 1040, ["class"]), [
|
|
351
|
-
[
|
|
351
|
+
[Ee, o(U)]
|
|
352
352
|
])
|
|
353
353
|
]),
|
|
354
354
|
_: 3
|
|
355
|
-
}, 16, ["name"])) :
|
|
355
|
+
}, 16, ["name"])) : d("", !0);
|
|
356
356
|
}
|
|
357
357
|
});
|
|
358
358
|
export {
|
|
359
|
-
|
|
359
|
+
wt as default
|
|
360
360
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { TtIcon as
|
|
4
|
-
import { TtText as
|
|
1
|
+
import { defineComponent as x, createBlock as l, openBlock as o, unref as t, normalizeClass as T, withCtx as r, createElementBlock as i, createCommentVNode as c, Fragment as p, createElementVNode as u, toDisplayString as f, createVNode as a, normalizeProps as h, mergeProps as g, createTextVNode as b } from "vue";
|
|
2
|
+
import k from "../../../../assets/svg/help.svg.js";
|
|
3
|
+
import { TtIcon as y } from "../../../tt-icon/index.js";
|
|
4
|
+
import { TtText as v } 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";
|
|
@@ -20,14 +20,14 @@ import z from "../form/FormLabel.vue.js";
|
|
|
20
20
|
import "../../../tt-form-item-error-tooltip/index.js";
|
|
21
21
|
import "@vueuse/core";
|
|
22
22
|
/* empty css */
|
|
23
|
-
import
|
|
23
|
+
import m from "../form/RenderContent.vue.js";
|
|
24
24
|
const N = {
|
|
25
25
|
key: 0,
|
|
26
26
|
class: "mr-[2px] text-destructive color-var(--el-color-error)"
|
|
27
27
|
}, E = { class: "flex items-center" }, F = { key: 0 }, q = { class: "flex items-center" }, L = {
|
|
28
28
|
key: 3,
|
|
29
29
|
class: "ml-[2px]"
|
|
30
|
-
},
|
|
30
|
+
}, le = /* @__PURE__ */ x({
|
|
31
31
|
__name: "FormLabel",
|
|
32
32
|
props: {
|
|
33
33
|
class: {},
|
|
@@ -41,71 +41,71 @@ const N = {
|
|
|
41
41
|
}) },
|
|
42
42
|
toolTipText: {}
|
|
43
43
|
},
|
|
44
|
-
setup(
|
|
45
|
-
const n =
|
|
46
|
-
return (
|
|
47
|
-
class:
|
|
44
|
+
setup(e) {
|
|
45
|
+
const n = e, s = (B(n.label) || C(n.label)) && n.label !== null;
|
|
46
|
+
return (P, S) => (o(), l(t(z), {
|
|
47
|
+
class: T(t(V)("flex items-center text-var(--el-font-size-base)", n.class))
|
|
48
48
|
}, {
|
|
49
|
-
default:
|
|
50
|
-
e.required ? (
|
|
51
|
-
e.label ? (
|
|
52
|
-
e.toolTipText ? (
|
|
49
|
+
default: r(() => [
|
|
50
|
+
e.required ? (o(), i("span", N, "*")) : c("", !0),
|
|
51
|
+
e.label ? (o(), i(p, { key: 1 }, [
|
|
52
|
+
e.toolTipText ? (o(), l(t(d), {
|
|
53
53
|
key: 0,
|
|
54
54
|
"popper-class": "mx-1",
|
|
55
55
|
placement: "top",
|
|
56
56
|
trigger: "hover"
|
|
57
57
|
}, {
|
|
58
|
-
content:
|
|
59
|
-
|
|
58
|
+
content: r(() => [
|
|
59
|
+
a(t(m), { content: e.toolTipText }, null, 8, ["content"])
|
|
60
60
|
]),
|
|
61
|
-
default:
|
|
61
|
+
default: r(() => [
|
|
62
62
|
u("div", E, [
|
|
63
|
-
|
|
63
|
+
t(s) ? (o(), l(t(m), {
|
|
64
64
|
key: 1,
|
|
65
65
|
content: e.label
|
|
66
|
-
}, null, 8, ["content"])) : (
|
|
66
|
+
}, null, 8, ["content"])) : (o(), i("div", F, f(e.label), 1))
|
|
67
67
|
])
|
|
68
68
|
]),
|
|
69
69
|
_: 1
|
|
70
|
-
})) : (
|
|
71
|
-
|
|
70
|
+
})) : (o(), i(p, { key: 1 }, [
|
|
71
|
+
t(s) ? (o(), l(t(m), {
|
|
72
72
|
key: 1,
|
|
73
73
|
content: e.label
|
|
74
|
-
}, null, 8, ["content"])) : (
|
|
75
|
-
default:
|
|
76
|
-
|
|
74
|
+
}, null, 8, ["content"])) : (o(), l(t(v), h(g({ key: 0 }, n.toolTip)), {
|
|
75
|
+
default: r(() => [
|
|
76
|
+
b(f(e.label), 1)
|
|
77
77
|
]),
|
|
78
78
|
_: 1
|
|
79
79
|
}, 16))
|
|
80
80
|
], 64))
|
|
81
|
-
], 64)) :
|
|
82
|
-
e.help ? (
|
|
81
|
+
], 64)) : c("", !0),
|
|
82
|
+
e.help ? (o(), l(t(d), {
|
|
83
83
|
key: 2,
|
|
84
84
|
"popper-class": "mx-1",
|
|
85
85
|
placement: "top",
|
|
86
86
|
trigger: e.helpTrigger
|
|
87
87
|
}, {
|
|
88
|
-
content:
|
|
89
|
-
|
|
88
|
+
content: r(() => [
|
|
89
|
+
a(t(m), { content: e.help }, null, 8, ["content"])
|
|
90
90
|
]),
|
|
91
|
-
default:
|
|
91
|
+
default: r(() => [
|
|
92
92
|
u("div", q, [
|
|
93
|
-
|
|
93
|
+
a(t(y), {
|
|
94
94
|
class: "ml-[4px] cursor-pointer",
|
|
95
95
|
size: 14,
|
|
96
96
|
"is-custom-svg": "",
|
|
97
|
-
icon:
|
|
97
|
+
icon: t(k)
|
|
98
98
|
}, null, 8, ["icon"])
|
|
99
99
|
])
|
|
100
100
|
]),
|
|
101
101
|
_: 1
|
|
102
|
-
}, 8, ["trigger"])) :
|
|
103
|
-
e.colon && e.label ? (
|
|
102
|
+
}, 8, ["trigger"])) : c("", !0),
|
|
103
|
+
e.colon && e.label ? (o(), i("span", L, ":")) : c("", !0)
|
|
104
104
|
]),
|
|
105
105
|
_: 1
|
|
106
106
|
}, 8, ["class"]));
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
109
|
export {
|
|
110
|
-
|
|
110
|
+
le as default
|
|
111
111
|
};
|