@dazhicheng/ui 1.6.41 → 1.6.43
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 +20 -25
- 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-keep-alive/core/Suspense.d.ts +3 -0
- package/dist/components/tt-keep-alive/core/Suspense.js +10 -0
- package/dist/components/tt-keep-alive/core/apiAsyncComponent.d.ts +2 -0
- package/dist/components/tt-keep-alive/core/apiAsyncComponent.js +6 -0
- package/dist/components/tt-keep-alive/core/component.d.ts +2 -0
- package/dist/components/tt-keep-alive/core/component.js +7 -0
- package/dist/components/tt-keep-alive/core/componentPublicInstance.d.ts +5 -0
- package/dist/components/tt-keep-alive/core/devtools.d.ts +2 -0
- package/dist/components/tt-keep-alive/core/errorHandling.d.ts +17 -0
- package/dist/components/tt-keep-alive/core/errorHandling.js +4 -0
- package/dist/components/tt-keep-alive/core/renderer.d.ts +32 -0
- package/dist/components/tt-keep-alive/core/renderer.js +8 -0
- package/dist/components/tt-keep-alive/core/shapeFlags.d.ts +13 -0
- package/dist/components/tt-keep-alive/core/vnode.d.ts +6 -0
- package/dist/components/tt-keep-alive/core/vnode.js +8 -0
- package/dist/components/tt-keep-alive/index.d.ts +26 -0
- package/dist/components/tt-keep-alive/index.js +139 -0
- 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/index.d.ts +1 -0
- package/dist/index.js +80 -78
- package/dist/node_modules/.pnpm/@vue_shared@3.5.34/node_modules/@vue/shared/dist/shared.esm-bundler.js +17 -0
- 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 +3 -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
|
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { isArray as t } from "../../../node_modules/.pnpm/@vue_shared@3.5.34/node_modules/@vue/shared/dist/shared.esm-bundler.js";
|
|
2
|
+
import { queuePostFlushCb as s } from "vue";
|
|
3
|
+
function r(e, i) {
|
|
4
|
+
i && i.pendingBranch ? t(e) ? i.effects.push(...e) : i.effects.push(e) : s(e);
|
|
5
|
+
}
|
|
6
|
+
const u = (e) => e.__isSuspense;
|
|
7
|
+
export {
|
|
8
|
+
u as isSuspense,
|
|
9
|
+
r as queueEffectWithSuspense
|
|
10
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { isFunction as r } from "../../../node_modules/.pnpm/@vue_shared@3.5.34/node_modules/@vue/shared/dist/shared.esm-bundler.js";
|
|
2
|
+
function m(a, e = !0) {
|
|
3
|
+
return r(a) ? a.displayName || a.name : a.name || e && a.__name;
|
|
4
|
+
}
|
|
5
|
+
export {
|
|
6
|
+
m as getComponentName
|
|
7
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum ErrorCodes {
|
|
2
|
+
SETUP_FUNCTION = 0,
|
|
3
|
+
RENDER_FUNCTION = 1,
|
|
4
|
+
WATCH_GETTER = 2,
|
|
5
|
+
WATCH_CALLBACK = 3,
|
|
6
|
+
WATCH_CLEANUP = 4,
|
|
7
|
+
NATIVE_EVENT_HANDLER = 5,
|
|
8
|
+
COMPONENT_EVENT_HANDLER = 6,
|
|
9
|
+
VNODE_HOOK = 7,
|
|
10
|
+
DIRECTIVE_HOOK = 8,
|
|
11
|
+
TRANSITION_HOOK = 9,
|
|
12
|
+
APP_ERROR_HANDLER = 10,
|
|
13
|
+
APP_WARN_HANDLER = 11,
|
|
14
|
+
FUNCTION_REF = 12,
|
|
15
|
+
ASYNC_COMPONENT_LOADER = 13,
|
|
16
|
+
SCHEDULER = 14
|
|
17
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var _ = /* @__PURE__ */ ((N) => (N[N.SETUP_FUNCTION = 0] = "SETUP_FUNCTION", N[N.RENDER_FUNCTION = 1] = "RENDER_FUNCTION", N[N.WATCH_GETTER = 2] = "WATCH_GETTER", N[N.WATCH_CALLBACK = 3] = "WATCH_CALLBACK", N[N.WATCH_CLEANUP = 4] = "WATCH_CLEANUP", N[N.NATIVE_EVENT_HANDLER = 5] = "NATIVE_EVENT_HANDLER", N[N.COMPONENT_EVENT_HANDLER = 6] = "COMPONENT_EVENT_HANDLER", N[N.VNODE_HOOK = 7] = "VNODE_HOOK", N[N.DIRECTIVE_HOOK = 8] = "DIRECTIVE_HOOK", N[N.TRANSITION_HOOK = 9] = "TRANSITION_HOOK", N[N.APP_ERROR_HANDLER = 10] = "APP_ERROR_HANDLER", N[N.APP_WARN_HANDLER = 11] = "APP_WARN_HANDLER", N[N.FUNCTION_REF = 12] = "FUNCTION_REF", N[N.ASYNC_COMPONENT_LOADER = 13] = "ASYNC_COMPONENT_LOADER", N[N.SCHEDULER = 14] = "SCHEDULER", N))(_ || {});
|
|
2
|
+
export {
|
|
3
|
+
_ as ErrorCodes
|
|
4
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ComponentInternalInstance, RendererElement, RendererNode, RendererOptions, SuspenseBoundary, VNode, VNodeArrayChildren, queuePostFlushCb } from 'vue';
|
|
2
|
+
import { queueEffectWithSuspense } from './Suspense';
|
|
3
|
+
export type RendererInternals<HostNode = RendererNode, HostElement = RendererElement> = {
|
|
4
|
+
p: PatchFn;
|
|
5
|
+
um: UnmountFn;
|
|
6
|
+
r: RemoveFn;
|
|
7
|
+
m: MoveFn;
|
|
8
|
+
mt: MountComponentFn;
|
|
9
|
+
mc: MountChildrenFn;
|
|
10
|
+
pc: PatchChildrenFn;
|
|
11
|
+
pbc: PatchBlockChildrenFn;
|
|
12
|
+
n: NextFn;
|
|
13
|
+
o: RendererOptions<HostNode, HostElement>;
|
|
14
|
+
};
|
|
15
|
+
type PatchFn = (n1: VNode | null, // null means this is a mount
|
|
16
|
+
n2: VNode, container: RendererElement, anchor?: RendererNode | null, parentComponent?: ComponentInternalInstance | null, parentSuspense?: SuspenseBoundary | null, isSVG?: boolean, slotScopeIds?: string[] | null, optimized?: boolean) => void;
|
|
17
|
+
type UnmountFn = (vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, doRemove?: boolean, optimized?: boolean) => void;
|
|
18
|
+
type RemoveFn = (vnode: VNode) => void;
|
|
19
|
+
type MoveFn = (vnode: VNode, container: RendererElement, anchor: RendererNode | null, type: MoveType, parentSuspense?: SuspenseBoundary | null) => void;
|
|
20
|
+
export declare enum MoveType {
|
|
21
|
+
ENTER = 0,
|
|
22
|
+
LEAVE = 1,
|
|
23
|
+
REORDER = 2
|
|
24
|
+
}
|
|
25
|
+
export type MountComponentFn = (initialVNode: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, isSVG: boolean, optimized: boolean) => void;
|
|
26
|
+
type MountChildrenFn = (children: VNodeArrayChildren, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, isSVG: boolean, slotScopeIds: string[] | null, optimized: boolean, start?: number) => void;
|
|
27
|
+
type PatchChildrenFn = (n1: VNode | null, n2: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, isSVG: boolean, slotScopeIds: string[] | null, optimized: boolean) => void;
|
|
28
|
+
type PatchBlockChildrenFn = (oldChildren: VNode[], newChildren: VNode[], fallbackContainer: RendererElement, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, isSVG: boolean, slotScopeIds: string[] | null) => void;
|
|
29
|
+
type NextFn = (vnode: VNode) => RendererNode | null;
|
|
30
|
+
export declare const queuePostRenderEffect: typeof queuePostFlushCb | typeof queueEffectWithSuspense;
|
|
31
|
+
export type SetupRenderEffectFn = (instance: ComponentInternalInstance, initialVNode: VNode, container: RendererElement, anchor: RendererNode | null, parentSuspense: SuspenseBoundary | null, isSVG: boolean, optimized: boolean) => void;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "vue";
|
|
2
|
+
import { queueEffectWithSuspense as t } from "./Suspense.js";
|
|
3
|
+
var R = /* @__PURE__ */ ((E) => (E[E.ENTER = 0] = "ENTER", E[E.LEAVE = 1] = "LEAVE", E[E.REORDER = 2] = "REORDER", E))(R || {});
|
|
4
|
+
const f = t;
|
|
5
|
+
export {
|
|
6
|
+
R as MoveType,
|
|
7
|
+
f as queuePostRenderEffect
|
|
8
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare enum ShapeFlags {
|
|
2
|
+
ELEMENT = 1,
|
|
3
|
+
FUNCTIONAL_COMPONENT = 2,
|
|
4
|
+
STATEFUL_COMPONENT = 4,
|
|
5
|
+
TEXT_CHILDREN = 8,
|
|
6
|
+
ARRAY_CHILDREN = 16,
|
|
7
|
+
SLOTS_CHILDREN = 32,
|
|
8
|
+
TELEPORT = 64,
|
|
9
|
+
SUSPENSE = 128,
|
|
10
|
+
COMPONENT_SHOULD_KEEP_ALIVE = 256,
|
|
11
|
+
COMPONENT_KEPT_ALIVE = 512,
|
|
12
|
+
COMPONENT = 6
|
|
13
|
+
}
|