@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,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as be, mergeModels as
|
|
2
|
-
import "../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.
|
|
1
|
+
import { defineComponent as be, mergeModels as Y, useModel as ge, ref as x, useAttrs as xe, inject as ye, computed as w, toValue as _, nextTick as L, onMounted as we, withDirectives as We, createElementBlock as P, openBlock as $, normalizeClass as K, unref as S, createVNode as ee, createCommentVNode as te, createBlock as Ce, mergeProps as ae, createSlots as Ve, renderList as Te, withCtx as Be, renderSlot as Se, normalizeProps as Ie, guardReactiveProps as ke, withModifiers as Ee, Teleport as Oe, withKeys as D, normalizeStyle as $e } from "vue";
|
|
2
|
+
import "../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.34_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
|
|
3
3
|
import { useDesign as De } from "../../packages/hooks/src/useDesign.js";
|
|
4
4
|
import "axios";
|
|
5
5
|
import { useZIndex as Me, useFormItem as Re, ElInput as le } from "element-plus";
|
|
6
|
-
import { isArray as Fe, isObject as He, isNumber as Ne, isString as Ae, isStringNumber as
|
|
6
|
+
import { isArray as Fe, isObject as He, isNumber as Ne, isString as Ae, isStringNumber as Le, isClient as M } from "../../packages/utils/src/is.js";
|
|
7
7
|
import "dayjs";
|
|
8
8
|
import "numeral";
|
|
9
9
|
import "xe-utils";
|
|
@@ -16,15 +16,15 @@ import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb
|
|
|
16
16
|
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
17
17
|
import "lodash-es";
|
|
18
18
|
import "vue-router";
|
|
19
|
-
import { useEventListener as
|
|
20
|
-
import { FieldContextKey as
|
|
19
|
+
import { useEventListener as z, onClickOutside as Pe } from "@vueuse/core";
|
|
20
|
+
import { FieldContextKey as Ke } from "vee-validate";
|
|
21
21
|
import "../tt-icon/index.js";
|
|
22
|
-
import
|
|
23
|
-
const
|
|
22
|
+
import ze from "../../directives/disabled-tip/index.js";
|
|
23
|
+
const Ue = 'a[href],button:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),summary,[tabindex]:not([tabindex="-1"])', pt = /* @__PURE__ */ be({
|
|
24
24
|
name: "TtInputTextarea",
|
|
25
25
|
inheritAttrs: !1,
|
|
26
26
|
__name: "index",
|
|
27
|
-
props: /* @__PURE__ */
|
|
27
|
+
props: /* @__PURE__ */ Y({
|
|
28
28
|
minHeight: { default: 28 },
|
|
29
29
|
maxHeight: { default: 100 },
|
|
30
30
|
autofocus: { type: Boolean, default: !1 },
|
|
@@ -47,20 +47,20 @@ const ze = 'a[href],button:not([disabled]),input:not([disabled]):not([type="hidd
|
|
|
47
47
|
},
|
|
48
48
|
modelModifiers: {}
|
|
49
49
|
}),
|
|
50
|
-
emits: /* @__PURE__ */
|
|
51
|
-
setup(
|
|
52
|
-
const i =
|
|
50
|
+
emits: /* @__PURE__ */ Y(["change", "input", "focus", "blur", "clear"], ["update:modelValue"]),
|
|
51
|
+
setup(u, { expose: ne, emit: ie }) {
|
|
52
|
+
const i = u, W = ie, C = ge(u, "modelValue"), b = x(null), h = x(null), c = x(null), V = x(null), r = x(!1), R = x(!1), U = x(2e3), I = xe(), { prefixCls: F } = De("input-textarea"), { nextZIndex: oe } = Me(), { formItem: v } = Re(), f = ye(Ke, null), p = x({
|
|
53
53
|
top: 0,
|
|
54
54
|
left: 0,
|
|
55
55
|
width: 0,
|
|
56
56
|
height: 0
|
|
57
57
|
});
|
|
58
|
-
function
|
|
58
|
+
function E() {
|
|
59
59
|
var t;
|
|
60
|
-
const e =
|
|
60
|
+
const e = b.value || ((t = h.value) == null ? void 0 : t.$el);
|
|
61
61
|
if (e) {
|
|
62
62
|
const a = e.getBoundingClientRect();
|
|
63
|
-
|
|
63
|
+
p.value = {
|
|
64
64
|
top: a.top,
|
|
65
65
|
left: a.left,
|
|
66
66
|
width: a.width,
|
|
@@ -68,78 +68,78 @@ const ze = 'a[href],button:not([disabled]),input:not([disabled]):not([type="hidd
|
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
z(
|
|
72
72
|
window,
|
|
73
73
|
"scroll",
|
|
74
74
|
() => {
|
|
75
|
-
r.value && (
|
|
75
|
+
r.value && (E(), (p.value.top + p.value.height < 0 || p.value.top > window.innerHeight) && (r.value = !1));
|
|
76
76
|
},
|
|
77
77
|
{ capture: !0, passive: !0 }
|
|
78
|
-
),
|
|
78
|
+
), z(
|
|
79
79
|
window,
|
|
80
80
|
"resize",
|
|
81
81
|
() => {
|
|
82
|
-
r.value &&
|
|
82
|
+
r.value && E();
|
|
83
83
|
},
|
|
84
84
|
{ passive: !0 }
|
|
85
|
-
),
|
|
85
|
+
), z(
|
|
86
86
|
window,
|
|
87
87
|
"keydown",
|
|
88
88
|
(e) => {
|
|
89
|
-
r.value && (e.key === "Escape" || e.key === "Esc") &&
|
|
89
|
+
r.value && (e.key === "Escape" || e.key === "Esc") && N(e);
|
|
90
90
|
},
|
|
91
91
|
{ capture: !0 }
|
|
92
|
-
),
|
|
93
|
-
|
|
92
|
+
), Pe(
|
|
93
|
+
V,
|
|
94
94
|
(e) => {
|
|
95
95
|
var a, l;
|
|
96
96
|
if (!r.value) return;
|
|
97
97
|
const t = e.target;
|
|
98
|
-
t && ((a =
|
|
98
|
+
t && ((a = b.value) != null && a.contains(t) || (l = V.value) != null && l.contains(t)) || (r.value = !1);
|
|
99
99
|
},
|
|
100
|
-
{ ignore: [
|
|
100
|
+
{ ignore: [b] }
|
|
101
101
|
);
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
104
|
-
return !!
|
|
102
|
+
const T = w(() => {
|
|
103
|
+
if (I.disabled !== void 0)
|
|
104
|
+
return !!I.disabled;
|
|
105
105
|
if (i.disabled)
|
|
106
106
|
return !0;
|
|
107
107
|
const e = i.disabledTip;
|
|
108
|
-
return Fe(e) && e.length > 0 ? e.some((t) => !!
|
|
109
|
-
}),
|
|
108
|
+
return Fe(e) && e.length > 0 ? e.some((t) => !!_(t == null ? void 0 : t.condition)) : He(e) ? !!_(e.condition) : !1;
|
|
109
|
+
}), H = w(() => T.value ? i.expandOnDisabled : !0), q = w(() => {
|
|
110
110
|
var e, t;
|
|
111
|
-
return
|
|
112
|
-
}),
|
|
111
|
+
return f ? !!((e = f.errorMessage) != null && e.value) || ((t = f.errors) == null ? void 0 : t.value) && f.errors.value.length > 0 : v != null && v.validateState ? v.validateState === "error" : i.isInValid !== void 0 ? !!i.isInValid : I.isInValid !== void 0 ? !!I.isInValid : !1;
|
|
112
|
+
}), j = w(() => {
|
|
113
113
|
const {
|
|
114
114
|
"data-testid": e,
|
|
115
115
|
class: t,
|
|
116
116
|
style: a,
|
|
117
117
|
onFocus: l,
|
|
118
118
|
onBlur: n,
|
|
119
|
-
onChange:
|
|
119
|
+
onChange: s,
|
|
120
120
|
onInput: o,
|
|
121
|
-
onClear:
|
|
121
|
+
onClear: d,
|
|
122
122
|
form: y,
|
|
123
|
-
isInValid:
|
|
124
|
-
...
|
|
125
|
-
} =
|
|
126
|
-
return
|
|
127
|
-
}), re =
|
|
128
|
-
var
|
|
123
|
+
isInValid: B,
|
|
124
|
+
...m
|
|
125
|
+
} = I;
|
|
126
|
+
return m;
|
|
127
|
+
}), re = w(() => !i.teleportTo), ue = w(() => i.teleportTo ? i.teleportTo : "body"), se = w(() => {
|
|
128
|
+
var X;
|
|
129
129
|
if (!r.value)
|
|
130
130
|
return { display: "none" };
|
|
131
|
-
const e =
|
|
132
|
-
let
|
|
133
|
-
o && e + a - l >= 0 ?
|
|
134
|
-
const y =
|
|
135
|
-
let
|
|
136
|
-
return
|
|
131
|
+
const e = p.value.top, t = p.value.left, a = p.value.height > 0 ? p.value.height : i.minHeight, l = i.maxHeight, n = M ? window.innerHeight : 800, s = M ? window.innerWidth : 1200, o = e + l > n;
|
|
132
|
+
let d = e;
|
|
133
|
+
o && e + a - l >= 0 ? d = e + a - l : o && (d = Math.max(8, n - l - 8));
|
|
134
|
+
const y = p.value.width > 0 ? p.value.width : ((X = b.value) == null ? void 0 : X.offsetWidth) || 200, { numericWidth: B, cssWidth: m } = de(y, s);
|
|
135
|
+
let g = t;
|
|
136
|
+
return g + B > s - 8 ? g = Math.max(8, s - B - 8) : g = Math.max(8, g), {
|
|
137
137
|
position: "fixed",
|
|
138
|
-
top: `${
|
|
139
|
-
left: `${
|
|
140
|
-
width:
|
|
138
|
+
top: `${d}px`,
|
|
139
|
+
left: `${g}px`,
|
|
140
|
+
width: m,
|
|
141
141
|
maxWidth: "calc(100vw - 16px)",
|
|
142
|
-
zIndex:
|
|
142
|
+
zIndex: U.value,
|
|
143
143
|
display: "block"
|
|
144
144
|
};
|
|
145
145
|
});
|
|
@@ -156,7 +156,7 @@ const ze = 'a[href],button:not([disabled]),input:not([disabled]):not([type="hidd
|
|
|
156
156
|
const n = parseFloat(l) / 100;
|
|
157
157
|
return { numericWidth: Math.round(t * n), cssWidth: l };
|
|
158
158
|
}
|
|
159
|
-
if (
|
|
159
|
+
if (Le(l)) {
|
|
160
160
|
const n = Number(l);
|
|
161
161
|
return { numericWidth: n, cssWidth: `${n}px` };
|
|
162
162
|
}
|
|
@@ -165,53 +165,53 @@ const ze = 'a[href],button:not([disabled]),input:not([disabled]):not([type="hidd
|
|
|
165
165
|
const a = Math.max(e, i.minExpandWidth);
|
|
166
166
|
return { numericWidth: a, cssWidth: `${a}px` };
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
!r.value &&
|
|
168
|
+
function Z() {
|
|
169
|
+
!r.value && H.value && O();
|
|
170
170
|
}
|
|
171
|
-
async function
|
|
172
|
-
var t, a, l, n,
|
|
173
|
-
if (!
|
|
171
|
+
async function O(e) {
|
|
172
|
+
var t, a, l, n, s;
|
|
173
|
+
if (!R.value) {
|
|
174
174
|
if (r.value) {
|
|
175
|
-
const o =
|
|
176
|
-
if (o && (
|
|
175
|
+
const o = M ? document.activeElement : null, d = V.value;
|
|
176
|
+
if (o && (d != null && d.contains(o)))
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
|
-
if (!
|
|
180
|
-
e &&
|
|
179
|
+
if (!H.value) {
|
|
180
|
+
e && W("focus", e);
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
|
-
if (
|
|
184
|
-
|
|
185
|
-
const o = ((a =
|
|
186
|
-
o ? o.focus({ preventScroll: !0 }) : (
|
|
183
|
+
if (E(), r.value = !0, U.value = oe(), await L(), !T.value) {
|
|
184
|
+
M && ((t = b.value) == null || t.dispatchEvent(new MouseEvent("mousedown", { bubbles: !0, cancelable: !0 })));
|
|
185
|
+
const o = ((a = c.value) == null ? void 0 : a.textarea) || ((n = (l = c.value) == null ? void 0 : l.$el) == null ? void 0 : n.querySelector("textarea"));
|
|
186
|
+
o ? o.focus({ preventScroll: !0 }) : (s = c.value) == null || s.focus();
|
|
187
187
|
}
|
|
188
|
-
e &&
|
|
188
|
+
e && W("focus", e);
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function k(e, t) {
|
|
192
192
|
var a;
|
|
193
|
-
if ((a =
|
|
194
|
-
}),
|
|
195
|
-
const l = t !== void 0 ? t :
|
|
196
|
-
|
|
197
|
-
})) : e === "change" ?
|
|
193
|
+
if ((a = v == null ? void 0 : v.validate) == null || a.call(v, e).catch(() => {
|
|
194
|
+
}), f) {
|
|
195
|
+
const l = t !== void 0 ? t : C.value;
|
|
196
|
+
f.setValue(l), e === "blur" ? (f.handleBlur(), f.validate().catch(() => {
|
|
197
|
+
})) : e === "change" ? f.handleChange(l) : e === "input" && f.validate().catch(() => {
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
function
|
|
202
|
-
|
|
201
|
+
function G(e) {
|
|
202
|
+
W("input", e), k("input", e);
|
|
203
203
|
}
|
|
204
204
|
function ce(e) {
|
|
205
205
|
var a, l;
|
|
206
206
|
const t = e.relatedTarget;
|
|
207
|
-
t && ((a =
|
|
207
|
+
t && ((a = b.value) != null && a.contains(t) || (l = V.value) != null && l.contains(t)) || (r.value = !1, W("blur", e), k("blur"));
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
var a, l, n,
|
|
211
|
-
e.stopPropagation(), "preventDefault" in e && e.preventDefault(),
|
|
212
|
-
const t = ((l =
|
|
213
|
-
t ? t.focus({ preventScroll: !0 }) : (o =
|
|
214
|
-
|
|
209
|
+
function N(e) {
|
|
210
|
+
var a, l, n, s, o;
|
|
211
|
+
e.stopPropagation(), "preventDefault" in e && e.preventDefault(), R.value = !0, r.value = !1, (a = c.value) == null || a.blur();
|
|
212
|
+
const t = ((l = h.value) == null ? void 0 : l.input) || ((s = (n = h.value) == null ? void 0 : n.$el) == null ? void 0 : s.querySelector("input"));
|
|
213
|
+
t ? t.focus({ preventScroll: !0 }) : (o = h.value) == null || o.focus(), L(() => {
|
|
214
|
+
R.value = !1;
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
217
|
function fe(e) {
|
|
@@ -220,57 +220,57 @@ const ze = 'a[href],button:not([disabled]),input:not([disabled]):not([type="hidd
|
|
|
220
220
|
const t = window.getComputedStyle(e);
|
|
221
221
|
return t.display !== "none" && t.visibility !== "hidden";
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
var
|
|
223
|
+
function J(e) {
|
|
224
|
+
var B;
|
|
225
225
|
e.stopPropagation(), "preventDefault" in e && e.preventDefault();
|
|
226
|
-
const t =
|
|
227
|
-
if (r.value = !1,
|
|
226
|
+
const t = b.value, a = V.value, l = !("shiftKey" in e && e.shiftKey);
|
|
227
|
+
if (r.value = !1, k("blur"), !t)
|
|
228
228
|
return;
|
|
229
|
-
const n = t.closest(".el-dialog, .el-drawer, [role='dialog']"),
|
|
230
|
-
const
|
|
231
|
-
return l ? !!(
|
|
229
|
+
const n = t.closest(".el-dialog, .el-drawer, [role='dialog']"), s = n || document, o = Array.from(s.querySelectorAll(Ue)).filter((m) => a != null && a.contains(m) || t.contains(m) ? !1 : fe(m)), d = o.filter((m) => {
|
|
230
|
+
const g = t.compareDocumentPosition(m);
|
|
231
|
+
return l ? !!(g & Node.DOCUMENT_POSITION_FOLLOWING) : !!(g & Node.DOCUMENT_POSITION_PRECEDING);
|
|
232
232
|
});
|
|
233
|
-
let y = l ?
|
|
234
|
-
!y && n && o.length > 0 && (y = l ? o[0] : o[o.length - 1]), y ?
|
|
233
|
+
let y = l ? d[0] : d[d.length - 1];
|
|
234
|
+
!y && n && o.length > 0 && (y = l ? o[0] : o[o.length - 1]), y ? L(() => {
|
|
235
235
|
y.focus({ preventScroll: !0 });
|
|
236
|
-
}) : (
|
|
236
|
+
}) : (B = h.value) == null || B.blur();
|
|
237
237
|
}
|
|
238
|
-
function
|
|
239
|
-
|
|
238
|
+
function Q(e) {
|
|
239
|
+
W("change", e), k("change", e);
|
|
240
240
|
}
|
|
241
|
-
function
|
|
242
|
-
|
|
241
|
+
function A() {
|
|
242
|
+
C.value = "", W("clear"), k("change", "");
|
|
243
243
|
}
|
|
244
244
|
function pe() {
|
|
245
245
|
var e, t, a, l;
|
|
246
246
|
if (r.value) {
|
|
247
|
-
const n = ((e =
|
|
248
|
-
n ? n.focus({ preventScroll: !0 }) : (l =
|
|
247
|
+
const n = ((e = c.value) == null ? void 0 : e.textarea) || ((a = (t = c.value) == null ? void 0 : t.$el) == null ? void 0 : a.querySelector("textarea"));
|
|
248
|
+
n ? n.focus({ preventScroll: !0 }) : (l = c.value) == null || l.focus();
|
|
249
249
|
} else
|
|
250
|
-
|
|
250
|
+
O();
|
|
251
251
|
}
|
|
252
252
|
function he() {
|
|
253
253
|
var e, t;
|
|
254
|
-
r.value ? (e =
|
|
254
|
+
r.value ? (e = c.value) == null || e.blur() : (t = h.value) == null || t.blur();
|
|
255
255
|
}
|
|
256
256
|
function ve() {
|
|
257
257
|
var e, t;
|
|
258
|
-
r.value ? (e =
|
|
258
|
+
r.value ? (e = c.value) == null || e.select() : (t = h.value) == null || t.select();
|
|
259
259
|
}
|
|
260
260
|
function me() {
|
|
261
|
-
|
|
261
|
+
A();
|
|
262
262
|
}
|
|
263
263
|
return we(() => {
|
|
264
|
-
|
|
264
|
+
E(), i.autofocus && O();
|
|
265
265
|
}), ne({
|
|
266
266
|
/**
|
|
267
267
|
* 未激活态单行触发输入框实例引用(ElInput)
|
|
268
268
|
*/
|
|
269
|
-
referenceRef:
|
|
269
|
+
referenceRef: h,
|
|
270
270
|
/**
|
|
271
271
|
* 激活展开态的多行文本框实例引用(ElInput)
|
|
272
272
|
*/
|
|
273
|
-
textareaRef:
|
|
273
|
+
textareaRef: c,
|
|
274
274
|
/**
|
|
275
275
|
* 使输入框获取焦点并展开多行浮层
|
|
276
276
|
*/
|
|
@@ -287,35 +287,35 @@ const ze = 'a[href],button:not([disabled]),input:not([disabled]):not([type="hidd
|
|
|
287
287
|
* 一键清空输入框绑定的文本内容
|
|
288
288
|
*/
|
|
289
289
|
clear: me
|
|
290
|
-
}), (e, t) => We((
|
|
290
|
+
}), (e, t) => We(($(), P("div", {
|
|
291
291
|
ref_key: "wrapperRef",
|
|
292
|
-
ref:
|
|
293
|
-
class:
|
|
294
|
-
|
|
292
|
+
ref: b,
|
|
293
|
+
class: K([
|
|
294
|
+
S(F),
|
|
295
295
|
{
|
|
296
|
-
"is-not-border": !
|
|
297
|
-
"is-disabled":
|
|
298
|
-
"is-error":
|
|
296
|
+
"is-not-border": !u.border,
|
|
297
|
+
"is-disabled": T.value,
|
|
298
|
+
"is-error": q.value
|
|
299
299
|
}
|
|
300
300
|
]),
|
|
301
|
-
onClick:
|
|
301
|
+
onClick: Z
|
|
302
302
|
}, [
|
|
303
|
-
ee(
|
|
303
|
+
ee(S(le), ae({
|
|
304
304
|
ref_key: "referenceRef",
|
|
305
|
-
ref:
|
|
306
|
-
modelValue:
|
|
307
|
-
"onUpdate:modelValue": t[0] || (t[0] = (a) =>
|
|
308
|
-
},
|
|
309
|
-
disabled:
|
|
310
|
-
readonly:
|
|
311
|
-
placeholder:
|
|
312
|
-
clearable:
|
|
305
|
+
ref: h,
|
|
306
|
+
modelValue: C.value,
|
|
307
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => C.value = a)
|
|
308
|
+
}, j.value, {
|
|
309
|
+
disabled: T.value,
|
|
310
|
+
readonly: u.readonly,
|
|
311
|
+
placeholder: u.placeholder,
|
|
312
|
+
clearable: u.clearable,
|
|
313
313
|
type: "text",
|
|
314
|
-
"input-style": { height: `${
|
|
315
|
-
onInput:
|
|
316
|
-
onFocus:
|
|
317
|
-
onChange:
|
|
318
|
-
onClear:
|
|
314
|
+
"input-style": { height: `${u.minHeight}px` },
|
|
315
|
+
onInput: G,
|
|
316
|
+
onFocus: O,
|
|
317
|
+
onChange: Q,
|
|
318
|
+
onClear: A
|
|
319
319
|
}), Ve({ _: 2 }, [
|
|
320
320
|
Te(Object.keys(e.$slots), (a) => ({
|
|
321
321
|
name: a,
|
|
@@ -324,61 +324,61 @@ const ze = 'a[href],button:not([disabled]),input:not([disabled]):not([type="hidd
|
|
|
324
324
|
])
|
|
325
325
|
}))
|
|
326
326
|
]), 1040, ["modelValue", "disabled", "readonly", "placeholder", "clearable", "input-style"]),
|
|
327
|
-
|
|
327
|
+
T.value && H.value ? ($(), P("div", {
|
|
328
328
|
key: 0,
|
|
329
|
-
class:
|
|
330
|
-
onClick: Ee(
|
|
329
|
+
class: K(`${S(F)}__disabled-mask`),
|
|
330
|
+
onClick: Ee(Z, ["stop"])
|
|
331
331
|
}, null, 2)) : te("", !0),
|
|
332
|
-
(
|
|
332
|
+
($(), Ce(Oe, {
|
|
333
333
|
to: ue.value,
|
|
334
334
|
disabled: re.value
|
|
335
335
|
}, [
|
|
336
|
-
r.value ? (
|
|
336
|
+
r.value ? ($(), P("div", {
|
|
337
337
|
key: 0,
|
|
338
338
|
ref_key: "floatingRef",
|
|
339
|
-
ref:
|
|
340
|
-
class:
|
|
341
|
-
`${
|
|
339
|
+
ref: V,
|
|
340
|
+
class: K([
|
|
341
|
+
`${S(F)}__floating`,
|
|
342
342
|
{
|
|
343
|
-
"is-error":
|
|
343
|
+
"is-error": q.value
|
|
344
344
|
}
|
|
345
345
|
]),
|
|
346
346
|
style: $e(se.value),
|
|
347
347
|
onKeydown: [
|
|
348
|
-
|
|
349
|
-
|
|
348
|
+
D(N, ["esc"]),
|
|
349
|
+
D(J, ["tab"])
|
|
350
350
|
]
|
|
351
351
|
}, [
|
|
352
|
-
ee(
|
|
352
|
+
ee(S(le), ae({
|
|
353
353
|
ref_key: "textareaRef",
|
|
354
|
-
ref:
|
|
355
|
-
modelValue:
|
|
356
|
-
"onUpdate:modelValue": t[1] || (t[1] = (a) =>
|
|
357
|
-
},
|
|
358
|
-
disabled:
|
|
359
|
-
readonly:
|
|
360
|
-
placeholder:
|
|
361
|
-
maxlength:
|
|
362
|
-
"show-word-limit":
|
|
363
|
-
clearable:
|
|
354
|
+
ref: c,
|
|
355
|
+
modelValue: C.value,
|
|
356
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => C.value = a)
|
|
357
|
+
}, j.value, {
|
|
358
|
+
disabled: T.value,
|
|
359
|
+
readonly: u.readonly,
|
|
360
|
+
placeholder: u.placeholder,
|
|
361
|
+
maxlength: u.maxlength,
|
|
362
|
+
"show-word-limit": u.showWordLimit,
|
|
363
|
+
clearable: u.clearable,
|
|
364
364
|
type: "textarea",
|
|
365
365
|
resize: "none",
|
|
366
366
|
"input-style": {
|
|
367
|
-
height: `${
|
|
367
|
+
height: `${u.maxHeight}px`
|
|
368
368
|
},
|
|
369
|
-
onInput:
|
|
369
|
+
onInput: G,
|
|
370
370
|
onBlur: ce,
|
|
371
|
-
onChange:
|
|
372
|
-
onClear:
|
|
371
|
+
onChange: Q,
|
|
372
|
+
onClear: A,
|
|
373
373
|
onKeydown: [
|
|
374
|
-
|
|
375
|
-
|
|
374
|
+
D(N, ["esc"]),
|
|
375
|
+
D(J, ["tab"])
|
|
376
376
|
]
|
|
377
377
|
}), null, 16, ["modelValue", "disabled", "readonly", "placeholder", "maxlength", "show-word-limit", "clearable", "input-style"])
|
|
378
378
|
], 38)) : te("", !0)
|
|
379
379
|
], 8, ["to", "disabled"]))
|
|
380
380
|
], 2)), [
|
|
381
|
-
[
|
|
381
|
+
[S(ze), i.disabledTip]
|
|
382
382
|
]);
|
|
383
383
|
}
|
|
384
384
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./loading.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7e6228e4"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { TtIcon as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as i, computed as s, createBlock as c, openBlock as n, Transition as r, withCtx as d, createElementBlock as o, createCommentVNode as a, normalizeStyle as f, normalizeClass as u, createElementVNode as g, createVNode as m, unref as y, toDisplayString as x } from "vue";
|
|
2
|
+
import { TtIcon as h } from "../../tt-icon/index.js";
|
|
3
|
+
const p = { class: "tt-loading__spinner" }, v = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "tt-loading__text"
|
|
6
6
|
}, k = `<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">
|
|
@@ -20,7 +20,7 @@ const v = { class: "tt-loading__spinner" }, _ = {
|
|
|
20
20
|
<circle class="dot" cx="20" cy="32" r="4"/>
|
|
21
21
|
<circle class="dot" cx="8" cy="20" r="4"/>
|
|
22
22
|
</g>
|
|
23
|
-
</svg>`,
|
|
23
|
+
</svg>`, B = /* @__PURE__ */ i({
|
|
24
24
|
name: "TtLoading",
|
|
25
25
|
inheritAttrs: !1,
|
|
26
26
|
__name: "loading",
|
|
@@ -35,35 +35,35 @@ const v = { class: "tt-loading__spinner" }, _ = {
|
|
|
35
35
|
textColor: { default: "#606266" },
|
|
36
36
|
spinnerColor: { default: "#409eff" }
|
|
37
37
|
},
|
|
38
|
-
setup(
|
|
39
|
-
const
|
|
40
|
-
backgroundColor:
|
|
41
|
-
zIndex:
|
|
42
|
-
"--tt-loading-spinner-color":
|
|
43
|
-
"--tt-loading-text-color":
|
|
38
|
+
setup(t) {
|
|
39
|
+
const e = t, l = s(() => ({
|
|
40
|
+
backgroundColor: e.background,
|
|
41
|
+
zIndex: e.fullscreen ? "9999999" : e.zIndex,
|
|
42
|
+
"--tt-loading-spinner-color": e.spinnerColor,
|
|
43
|
+
"--tt-loading-text-color": e.textColor
|
|
44
44
|
}));
|
|
45
|
-
return (
|
|
45
|
+
return (C, b) => (n(), c(r, {
|
|
46
46
|
name: "tt-loading-fade",
|
|
47
47
|
appear: ""
|
|
48
48
|
}, {
|
|
49
|
-
default:
|
|
50
|
-
|
|
49
|
+
default: d(() => [
|
|
50
|
+
t.visible ? (n(), o("div", {
|
|
51
51
|
key: 0,
|
|
52
|
-
class:
|
|
53
|
-
"tt-loading--fullscreen":
|
|
54
|
-
"tt-loading--absolute": !
|
|
52
|
+
class: u(["tt-loading", {
|
|
53
|
+
"tt-loading--fullscreen": t.fullscreen,
|
|
54
|
+
"tt-loading--absolute": !t.fullscreen
|
|
55
55
|
}]),
|
|
56
|
-
style:
|
|
56
|
+
style: f(l.value)
|
|
57
57
|
}, [
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
g("div", p, [
|
|
59
|
+
m(y(h), {
|
|
60
60
|
"is-custom-svg": "",
|
|
61
|
-
icon:
|
|
61
|
+
icon: t.svg || k,
|
|
62
62
|
size: 52,
|
|
63
63
|
class: "tt-loading__circular"
|
|
64
64
|
}, null, 8, ["icon"])
|
|
65
65
|
]),
|
|
66
|
-
|
|
66
|
+
t.text ? (n(), o("p", v, x(t.text), 1)) : a("", !0)
|
|
67
67
|
], 6)) : a("", !0)
|
|
68
68
|
]),
|
|
69
69
|
_: 1
|
|
@@ -71,5 +71,5 @@ const v = { class: "tt-loading__spinner" }, _ = {
|
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
73
|
export {
|
|
74
|
-
|
|
74
|
+
B as default
|
|
75
75
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as l, createBlock as m, openBlock as s, unref as t, mergeProps as n } from "vue";
|
|
2
|
-
import "../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.
|
|
2
|
+
import "../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.34_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
|
|
3
3
|
import { useDesign as a } from "../../packages/hooks/src/useDesign.js";
|
|
4
4
|
import "axios";
|
|
5
5
|
import "element-plus";
|