@das-fed/upf-ui 6.4.0-dev.132 → 6.4.0-dev.134
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/package.json +5 -5
- package/packages/business-components/change-pwd/src/hooks/use-changePwd.d.ts +8 -2
- package/packages/business-components/process-form/src/hooks/useForm.d.ts +8 -2
- package/packages/components/button/index.d.ts +3 -0
- package/packages/components/button/index.js +276 -283
- package/packages/components/button/index.js.gz +0 -0
- package/packages/components/button/src/Index.vue.d.ts +1 -0
- package/packages/components/button/style.css +1 -1
- package/packages/components/button/style.css.gz +0 -0
- package/packages/components/cascader/index.d.ts +9 -9
- package/packages/components/cascader/index.js +110 -100
- package/packages/components/cascader/index.js.gz +0 -0
- package/packages/components/cascader/src/Index.vue.d.ts +1 -1
- package/packages/components/cascader/style.css +1 -1
- package/packages/components/cascader/style.css.gz +0 -0
- package/packages/components/checkbox/index.js +355 -334
- package/packages/components/checkbox/index.js.gz +0 -0
- package/packages/components/checkbox/src/Index.vue.d.ts +5 -0
- package/packages/components/checkbox/style.css +1 -1
- package/packages/components/checkbox/style.css.gz +0 -0
- package/packages/components/color-picker/index.js +42 -41
- package/packages/components/color-picker/index.js.gz +0 -0
- package/packages/components/color-picker/style.css +1 -1
- package/packages/components/color-picker/style.css.gz +0 -0
- package/packages/components/date-picker/index.js +503 -486
- package/packages/components/date-picker/index.js.gz +0 -0
- package/packages/components/date-picker/style.css +1 -1
- package/packages/components/date-picker/style.css.gz +0 -0
- package/packages/components/edit-table/index.js +1 -1
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/edit-table/style.css +1 -1
- package/packages/components/edit-table/style.css.gz +0 -0
- package/packages/components/error-overlay-model/index.js +15 -15
- package/packages/components/error-overlay-model/index.js.gz +0 -0
- package/packages/components/form/hooks/use-form-size.d.ts +3 -0
- package/packages/components/form/index.d.ts +12 -2
- package/packages/components/form/index.js +62 -69
- package/packages/components/form/index.js.gz +0 -0
- package/packages/components/form/src/Index.vue.d.ts +9 -0
- package/packages/components/form/src/type.d.ts +3 -0
- package/packages/components/form/style.css +1 -1
- package/packages/components/form-item/index.js +1110 -1082
- package/packages/components/form-item/index.js.gz +0 -0
- package/packages/components/form-item/src/hooks/use-form.d.ts +13 -3
- package/packages/components/form-item/src/type.d.ts +6 -0
- package/packages/components/form-item/style.css +1 -1
- package/packages/components/form-item/style.css.gz +0 -0
- package/packages/components/input/index.js +399 -215
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/input/src/constants.d.ts +17 -0
- package/packages/components/input/src/hooks/use-overflow-tip.d.ts +13 -0
- package/packages/components/input/src/type.d.ts +9 -9
- package/packages/components/input/style.css +1 -1
- package/packages/components/input/style.css.gz +0 -0
- package/packages/components/input-dialog-select/index.js +74 -66
- package/packages/components/input-dialog-select/index.js.gz +0 -0
- package/packages/components/input-dialog-select/style.css +1 -1
- package/packages/components/input-dialog-select/style.css.gz +0 -0
- package/packages/components/input-number/index.js +76 -70
- package/packages/components/input-number/index.js.gz +0 -0
- package/packages/components/input-number/style.css +1 -1
- package/packages/components/input-number/style.css.gz +0 -0
- package/packages/components/message/index.js +1 -1
- package/packages/components/message/index.js.gz +0 -0
- package/packages/components/message/style.css +1 -1
- package/packages/components/message/style.css.gz +0 -0
- package/packages/components/radio/index.js +116 -103
- package/packages/components/radio/index.js.gz +0 -0
- package/packages/components/radio/src/Index.vue.d.ts +5 -0
- package/packages/components/radio/style.css +1 -1
- package/packages/components/radio/style.css.gz +0 -0
- package/packages/components/select/index.js +92 -88
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select/style.css +1 -1
- package/packages/components/select/style.css.gz +0 -0
- package/packages/components/select-input/index.js +39 -37
- package/packages/components/select-input/index.js.gz +0 -0
- package/packages/components/select-input/style.css +1 -1
- package/packages/components/select-input/style.css.gz +0 -0
- package/packages/components/split-panel/index.js +209 -193
- package/packages/components/split-panel/index.js.gz +0 -0
- package/packages/components/split-panel/style.css +1 -1
- package/packages/components/split-panel/style.css.gz +0 -0
- package/packages/components/switch/index.js +45 -29
- package/packages/components/switch/index.js.gz +0 -0
- package/packages/components/switch/style.css +1 -1
- package/packages/components/switch/style.css.gz +0 -0
- package/packages/components/table/index.js +1944 -1932
- package/packages/components/table/index.js.gz +0 -0
- package/packages/components/table/src/Table.vue.d.ts +12 -9
- package/packages/components/table/style.css +1 -1
- package/packages/components/table/style.css.gz +0 -0
- package/packages/components/tree-select/index.js +1 -1
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/upload/index.js +3 -2
- package/packages/components/upload/index.js.gz +0 -0
- package/packages/components/upload/style.css +1 -1
- package/packages/components/upload/style.css.gz +0 -0
- package/packages/components/upload/theme/index.d.ts +3 -0
- package/packages/components/form-item/src/hooks/useFormLabelWidth.d.ts +0 -6
- package/packages/components/input/index.d.ts +0 -124
- package/packages/components/input/src/index.vue.d.ts +0 -49
|
@@ -1,276 +1,460 @@
|
|
|
1
1
|
import '@das-fed/upf-ui/packages/components/input/style.css';
|
|
2
|
-
import { withInstall as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { withInstall as q } from "@das-fed/upf-utils/with-install/index";
|
|
3
|
+
import { setThemeRule as J } from "@das-fed/upf-web/packages/theme/index";
|
|
4
|
+
import { unref as O, getCurrentScope as ee, onScopeDispose as te, getCurrentInstance as H, onMounted as oe, nextTick as R, ref as v, watch as I, computed as h, defineComponent as re, createElementBlock as P, openBlock as T, normalizeClass as A, normalizeStyle as ne, createCommentVNode as _, createVNode as M, withCtx as C, mergeProps as ae, createSlots as le, renderSlot as k, Fragment as se, createBlock as ie, withDirectives as ue, createTextVNode as de, toDisplayString as ce } from "vue";
|
|
5
5
|
import "element-plus/es/components/input/style/css";
|
|
6
|
-
import { ElInput as
|
|
7
|
-
import { t as
|
|
8
|
-
import { DasTooltip as
|
|
9
|
-
import { DasErrorOverlayModel as
|
|
10
|
-
import {
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
13
|
-
return typeof
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
import { ElInput as fe } from "element-plus";
|
|
7
|
+
import { t as pe, setI18nRule as ve } from "@das-fed/upf-web/packages/i18n/index";
|
|
8
|
+
import { DasTooltip as me } from "@das-fed/upf-ui/packages/components/tooltip/index";
|
|
9
|
+
import { DasErrorOverlayModel as he } from "@das-fed/upf-ui/packages/components/error-overlay-model/index";
|
|
10
|
+
import { vDasTooltip as ye } from "@das-fed/upf-ui/packages/components/text-tooltip/index";
|
|
11
|
+
const be = ["auto", "fit-content", "inherit", "initial", "max-content", "min-content", "revert", "unset", "-webkit-fill-available"], we = (e) => /^[+-]?\d+(\.\d+)?(px|em|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|%)$/.test(e), ge = (e) => {
|
|
12
|
+
if (e)
|
|
13
|
+
return typeof e == "string" && we(e) || typeof e == "string" && be.includes(e) ? e : e + "px";
|
|
14
|
+
}, V = {
|
|
15
|
+
large: {
|
|
16
|
+
height: "40px",
|
|
17
|
+
fontSize: "14px",
|
|
18
|
+
defaultWidth: "230px"
|
|
19
|
+
},
|
|
20
|
+
default: {
|
|
21
|
+
height: "32px",
|
|
22
|
+
fontSize: "14px",
|
|
23
|
+
defaultWidth: "230px"
|
|
24
|
+
},
|
|
25
|
+
small: {
|
|
26
|
+
height: "24px",
|
|
27
|
+
fontSize: "12px",
|
|
28
|
+
defaultWidth: "230px"
|
|
29
|
+
},
|
|
30
|
+
table: {
|
|
31
|
+
height: "30px",
|
|
32
|
+
fontSize: "12",
|
|
33
|
+
defaultWidth: "132px"
|
|
34
|
+
}
|
|
35
|
+
}, D = {
|
|
36
|
+
view: {
|
|
37
|
+
color: "#d9d9d9"
|
|
38
|
+
},
|
|
39
|
+
disabled: {
|
|
40
|
+
color: "#d9d9d9"
|
|
41
|
+
},
|
|
42
|
+
error: {
|
|
43
|
+
color: "#F0262D"
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
var N;
|
|
47
|
+
const Z = typeof window < "u", Oe = (e) => typeof e == "string", xe = () => {
|
|
48
|
+
};
|
|
49
|
+
Z && ((N = window == null ? void 0 : window.navigator) != null && N.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
50
|
+
function G(e) {
|
|
51
|
+
return typeof e == "function" ? e() : O(e);
|
|
52
|
+
}
|
|
53
|
+
function _e(e) {
|
|
54
|
+
return e;
|
|
55
|
+
}
|
|
56
|
+
function K(e) {
|
|
57
|
+
return ee() ? (te(e), !0) : !1;
|
|
58
|
+
}
|
|
59
|
+
function Ee(e, o = !0) {
|
|
60
|
+
H() ? oe(e) : o ? e() : R(e);
|
|
61
|
+
}
|
|
62
|
+
function E(e) {
|
|
63
|
+
var o;
|
|
64
|
+
const r = G(e);
|
|
65
|
+
return (o = r == null ? void 0 : r.$el) != null ? o : r;
|
|
66
|
+
}
|
|
67
|
+
const z = Z ? window : void 0;
|
|
68
|
+
function x(...e) {
|
|
69
|
+
let o, r, t, s;
|
|
70
|
+
if (Oe(e[0]) || Array.isArray(e[0]) ? ([r, t, s] = e, o = z) : [o, r, t, s] = e, !o)
|
|
71
|
+
return xe;
|
|
72
|
+
Array.isArray(r) || (r = [r]), Array.isArray(t) || (t = [t]);
|
|
73
|
+
const c = [], u = () => {
|
|
74
|
+
c.forEach((a) => a()), c.length = 0;
|
|
75
|
+
}, d = (a, i, m, b) => (a.addEventListener(i, m, b), () => a.removeEventListener(i, m, b)), n = I(() => [E(o), G(s)], ([a, i]) => {
|
|
76
|
+
u(), a && c.push(...r.flatMap((m) => t.map((b) => d(a, m, b, i))));
|
|
77
|
+
}, { immediate: !0, flush: "post" }), f = () => {
|
|
78
|
+
n(), u();
|
|
79
|
+
};
|
|
80
|
+
return K(f), f;
|
|
81
|
+
}
|
|
82
|
+
function Ie(e, o = !1) {
|
|
83
|
+
const r = v(), t = () => r.value = !!e();
|
|
84
|
+
return t(), Ee(t, o), r;
|
|
85
|
+
}
|
|
86
|
+
const F = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Q = "__vueuse_ssr_handlers__";
|
|
87
|
+
F[Q] = F[Q] || {};
|
|
88
|
+
var X = Object.getOwnPropertySymbols, Se = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable, Te = (e, o) => {
|
|
89
|
+
var r = {};
|
|
90
|
+
for (var t in e)
|
|
91
|
+
Se.call(e, t) && o.indexOf(t) < 0 && (r[t] = e[t]);
|
|
92
|
+
if (e != null && X)
|
|
93
|
+
for (var t of X(e))
|
|
94
|
+
o.indexOf(t) < 0 && Be.call(e, t) && (r[t] = e[t]);
|
|
95
|
+
return r;
|
|
96
|
+
};
|
|
97
|
+
function Ce(e, o, r = {}) {
|
|
98
|
+
const t = r, { window: s = z } = t, c = Te(t, ["window"]);
|
|
99
|
+
let u;
|
|
100
|
+
const d = Ie(() => s && "ResizeObserver" in s), n = () => {
|
|
101
|
+
u && (u.disconnect(), u = void 0);
|
|
102
|
+
}, f = I(() => E(e), (i) => {
|
|
103
|
+
n(), d.value && s && i && (u = new ResizeObserver(o), u.observe(i, c));
|
|
104
|
+
}, { immediate: !0, flush: "post" }), a = () => {
|
|
105
|
+
n(), f();
|
|
106
|
+
};
|
|
107
|
+
return K(a), {
|
|
108
|
+
isSupported: d,
|
|
109
|
+
stop: a
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function ze(e, o = { width: 0, height: 0 }, r = {}) {
|
|
113
|
+
const { window: t = z, box: s = "content-box" } = r, c = h(() => {
|
|
114
|
+
var n, f;
|
|
115
|
+
return (f = (n = E(e)) == null ? void 0 : n.namespaceURI) == null ? void 0 : f.includes("svg");
|
|
116
|
+
}), u = v(o.width), d = v(o.height);
|
|
117
|
+
return Ce(e, ([n]) => {
|
|
118
|
+
const f = s === "border-box" ? n.borderBoxSize : s === "content-box" ? n.contentBoxSize : n.devicePixelContentBoxSize;
|
|
119
|
+
if (t && c.value) {
|
|
120
|
+
const a = E(e);
|
|
121
|
+
if (a) {
|
|
122
|
+
const i = t.getComputedStyle(a);
|
|
123
|
+
u.value = parseFloat(i.width), d.value = parseFloat(i.height);
|
|
124
|
+
}
|
|
125
|
+
} else if (f) {
|
|
126
|
+
const a = Array.isArray(f) ? f : [f];
|
|
127
|
+
u.value = a.reduce((i, { inlineSize: m }) => i + m, 0), d.value = a.reduce((i, { blockSize: m }) => i + m, 0);
|
|
128
|
+
} else
|
|
129
|
+
u.value = n.contentRect.width, d.value = n.contentRect.height;
|
|
130
|
+
}, r), I(() => E(e), (n) => {
|
|
131
|
+
u.value = n ? o.width : 0, d.value = n ? o.height : 0;
|
|
132
|
+
}), {
|
|
133
|
+
width: u,
|
|
134
|
+
height: d
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
function We(e, o = {}) {
|
|
138
|
+
const { initialValue: r = !1 } = o, t = v(!1), s = h(() => E(e));
|
|
139
|
+
x(s, "focus", () => t.value = !0), x(s, "blur", () => t.value = !1);
|
|
140
|
+
const c = h({
|
|
141
|
+
get: () => t.value,
|
|
142
|
+
set(u) {
|
|
143
|
+
var d, n;
|
|
144
|
+
!u && t.value ? (d = s.value) == null || d.blur() : u && !t.value && ((n = s.value) == null || n.focus());
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
return I(s, () => {
|
|
148
|
+
c.value = r;
|
|
149
|
+
}, { immediate: !0, flush: "post" }), { focused: c };
|
|
150
|
+
}
|
|
151
|
+
function Pe(e = {}) {
|
|
152
|
+
const {
|
|
153
|
+
type: o = "page",
|
|
154
|
+
touch: r = !0,
|
|
155
|
+
resetOnTouchEnds: t = !1,
|
|
156
|
+
initialValue: s = { x: 0, y: 0 },
|
|
157
|
+
window: c = z,
|
|
158
|
+
eventFilter: u
|
|
159
|
+
} = e, d = v(s.x), n = v(s.y), f = v(null), a = (p) => {
|
|
160
|
+
o === "page" ? (d.value = p.pageX, n.value = p.pageY) : o === "client" ? (d.value = p.clientX, n.value = p.clientY) : o === "movement" && (d.value = p.movementX, n.value = p.movementY), f.value = "mouse";
|
|
161
|
+
}, i = () => {
|
|
162
|
+
d.value = s.x, n.value = s.y;
|
|
163
|
+
}, m = (p) => {
|
|
164
|
+
if (p.touches.length > 0) {
|
|
165
|
+
const g = p.touches[0];
|
|
166
|
+
o === "page" ? (d.value = g.pageX, n.value = g.pageY) : o === "client" && (d.value = g.clientX, n.value = g.clientY), f.value = "touch";
|
|
167
|
+
}
|
|
168
|
+
}, b = (p) => u === void 0 ? a(p) : u(() => a(p), {}), w = (p) => u === void 0 ? m(p) : u(() => m(p), {});
|
|
169
|
+
return c && (x(c, "mousemove", b, { passive: !0 }), x(c, "dragover", b, { passive: !0 }), r && o !== "movement" && (x(c, "touchstart", w, { passive: !0 }), x(c, "touchmove", w, { passive: !0 }), t && x(c, "touchend", i, { passive: !0 }))), {
|
|
170
|
+
x: d,
|
|
171
|
+
y: n,
|
|
172
|
+
sourceType: f
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
function ke(e, o = {}) {
|
|
176
|
+
const {
|
|
177
|
+
handleOutside: r = !0,
|
|
178
|
+
window: t = z
|
|
179
|
+
} = o, { x: s, y: c, sourceType: u } = Pe(o), d = v(e ?? (t == null ? void 0 : t.document.body)), n = v(0), f = v(0), a = v(0), i = v(0), m = v(0), b = v(0), w = v(!0);
|
|
180
|
+
let p = () => {
|
|
181
|
+
};
|
|
182
|
+
return t && (p = I([d, s, c], () => {
|
|
183
|
+
const g = E(d);
|
|
184
|
+
if (!g)
|
|
185
|
+
return;
|
|
186
|
+
const {
|
|
187
|
+
left: $,
|
|
188
|
+
top: L,
|
|
189
|
+
width: S,
|
|
190
|
+
height: B
|
|
191
|
+
} = g.getBoundingClientRect();
|
|
192
|
+
a.value = $ + t.pageXOffset, i.value = L + t.pageYOffset, m.value = B, b.value = S;
|
|
193
|
+
const l = s.value - a.value, y = c.value - i.value;
|
|
194
|
+
w.value = S === 0 || B === 0 || l < 0 || y < 0 || l > S || y > B, (r || !w.value) && (n.value = l, f.value = y);
|
|
195
|
+
}, { immediate: !0 }), x(document, "mouseleave", () => {
|
|
196
|
+
w.value = !0;
|
|
197
|
+
})), {
|
|
198
|
+
x: s,
|
|
199
|
+
y: c,
|
|
200
|
+
sourceType: u,
|
|
201
|
+
elementX: n,
|
|
202
|
+
elementY: f,
|
|
203
|
+
elementPositionX: a,
|
|
204
|
+
elementPositionY: i,
|
|
205
|
+
elementHeight: m,
|
|
206
|
+
elementWidth: b,
|
|
207
|
+
isOutside: w,
|
|
208
|
+
stop: p
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
var Y;
|
|
212
|
+
(function(e) {
|
|
213
|
+
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
214
|
+
})(Y || (Y = {}));
|
|
215
|
+
var $e = Object.defineProperty, U = Object.getOwnPropertySymbols, Le = Object.prototype.hasOwnProperty, Ve = Object.prototype.propertyIsEnumerable, j = (e, o, r) => o in e ? $e(e, o, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[o] = r, Re = (e, o) => {
|
|
216
|
+
for (var r in o || (o = {}))
|
|
217
|
+
Le.call(o, r) && j(e, r, o[r]);
|
|
218
|
+
if (U)
|
|
219
|
+
for (var r of U(o))
|
|
220
|
+
Ve.call(o, r) && j(e, r, o[r]);
|
|
221
|
+
return e;
|
|
222
|
+
};
|
|
223
|
+
const Ae = {
|
|
224
|
+
easeInSine: [0.12, 0, 0.39, 0],
|
|
225
|
+
easeOutSine: [0.61, 1, 0.88, 1],
|
|
226
|
+
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
227
|
+
easeInQuad: [0.11, 0, 0.5, 0],
|
|
228
|
+
easeOutQuad: [0.5, 1, 0.89, 1],
|
|
229
|
+
easeInOutQuad: [0.45, 0, 0.55, 1],
|
|
230
|
+
easeInCubic: [0.32, 0, 0.67, 0],
|
|
231
|
+
easeOutCubic: [0.33, 1, 0.68, 1],
|
|
232
|
+
easeInOutCubic: [0.65, 0, 0.35, 1],
|
|
233
|
+
easeInQuart: [0.5, 0, 0.75, 0],
|
|
234
|
+
easeOutQuart: [0.25, 1, 0.5, 1],
|
|
235
|
+
easeInOutQuart: [0.76, 0, 0.24, 1],
|
|
236
|
+
easeInQuint: [0.64, 0, 0.78, 0],
|
|
237
|
+
easeOutQuint: [0.22, 1, 0.36, 1],
|
|
238
|
+
easeInOutQuint: [0.83, 0, 0.17, 1],
|
|
239
|
+
easeInExpo: [0.7, 0, 0.84, 0],
|
|
240
|
+
easeOutExpo: [0.16, 1, 0.3, 1],
|
|
241
|
+
easeInOutExpo: [0.87, 0, 0.13, 1],
|
|
242
|
+
easeInCirc: [0.55, 0, 1, 0.45],
|
|
243
|
+
easeOutCirc: [0, 0.55, 0.45, 1],
|
|
244
|
+
easeInOutCirc: [0.85, 0, 0.15, 1],
|
|
245
|
+
easeInBack: [0.36, 0, 0.66, -0.56],
|
|
246
|
+
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
247
|
+
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
248
|
+
};
|
|
249
|
+
Re({
|
|
250
|
+
linear: _e
|
|
251
|
+
}, Ae);
|
|
252
|
+
function Me({
|
|
253
|
+
elInputRef: e,
|
|
254
|
+
inputValue: o,
|
|
255
|
+
placeholder: r
|
|
256
|
+
}) {
|
|
257
|
+
var f;
|
|
258
|
+
const t = (f = H()) == null ? void 0 : f.props, { focused: s } = We(h(() => {
|
|
259
|
+
var a;
|
|
260
|
+
return (a = e.value) == null ? void 0 : a.ref;
|
|
261
|
+
})), c = v(!1), u = h(() => c.value && !s.value && t.isTitle), d = h(() => o.value ? o.value : r.value), n = async () => {
|
|
262
|
+
var i;
|
|
263
|
+
const a = (i = e.value) == null ? void 0 : i.ref;
|
|
264
|
+
a && (o.value || (a.value = r.value, await R()), c.value = a.scrollWidth > a.clientWidth, a.value = o.value);
|
|
265
|
+
};
|
|
266
|
+
return I(e, () => {
|
|
267
|
+
e.value && n();
|
|
268
|
+
}), I(
|
|
269
|
+
() => [o.value, r.value],
|
|
270
|
+
() => {
|
|
271
|
+
R(n);
|
|
272
|
+
}
|
|
273
|
+
), {
|
|
274
|
+
showToolTip: u,
|
|
275
|
+
tooltipContent: d
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
const De = {
|
|
21
279
|
key: 0,
|
|
22
|
-
class: "das-input-
|
|
23
|
-
},
|
|
280
|
+
class: "das-input-message"
|
|
281
|
+
}, Ne = ["title"], Fe = {
|
|
24
282
|
inheritAttrs: !1
|
|
25
|
-
},
|
|
26
|
-
...
|
|
283
|
+
}, Qe = /* @__PURE__ */ re({
|
|
284
|
+
...Fe,
|
|
27
285
|
__name: "index",
|
|
28
286
|
props: {
|
|
29
287
|
modelValue: { default: "" },
|
|
30
288
|
type: { default: "text" },
|
|
31
|
-
width: {
|
|
32
|
-
borderType: { default: "
|
|
289
|
+
width: {},
|
|
290
|
+
borderType: { default: "bordered" },
|
|
33
291
|
placeholder: { default: "" },
|
|
34
292
|
size: { default: "default" },
|
|
35
293
|
disabled: { type: Boolean, default: !1 },
|
|
36
294
|
isView: { type: Boolean, default: !1 },
|
|
37
|
-
success: { type: Boolean, default: !1 },
|
|
38
|
-
successLabel: { default: "" },
|
|
39
295
|
error: { type: Boolean, default: !1 },
|
|
40
296
|
errorLabel: { default: "" },
|
|
41
|
-
isErrorTitle: { type: Boolean, default: !
|
|
297
|
+
isErrorTitle: { type: Boolean, default: !0 },
|
|
42
298
|
isTitle: { type: Boolean, default: !0 },
|
|
43
299
|
errorMode: { default: "default" },
|
|
44
300
|
errorModelZIndex: { default: 2e3 },
|
|
45
301
|
noSetDefaultVal: { type: Boolean, default: !1 },
|
|
46
|
-
autosize: { type: [Boolean, Object], default:
|
|
302
|
+
autosize: { type: [Boolean, Object], default: () => ({ minRows: 3 }) },
|
|
47
303
|
showWordLimit: { type: Boolean, default: !0 },
|
|
48
304
|
showTextWordLimit: { type: Boolean, default: !1 },
|
|
49
|
-
maxlength: {
|
|
50
|
-
|
|
51
|
-
|
|
305
|
+
maxlength: {},
|
|
306
|
+
filterSpace: { type: Boolean, default: !0 },
|
|
307
|
+
clearable: { type: Boolean }
|
|
52
308
|
},
|
|
53
309
|
emits: ["update:modelValue", "change"],
|
|
54
|
-
setup(
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
return
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
(e) => {
|
|
72
|
-
C(() => {
|
|
73
|
-
var t;
|
|
74
|
-
e && (e != null && e.nextSibling) && ((t = e.nextSibling) != null && t.style) && (e.nextSibling.style.display = "none");
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
const j = (e) => {
|
|
79
|
-
let t = e + "";
|
|
80
|
-
o.type !== "textarea" && o.filterSpace && (t = t.trim()), u.value = t, w("change", t);
|
|
81
|
-
}, q = () => {
|
|
82
|
-
var t;
|
|
83
|
-
o.borderType === "bottom" && (k.value = !0);
|
|
84
|
-
const e = (t = s.value) == null ? void 0 : t.textarea;
|
|
85
|
-
e && e.nextSibling && e.nextSibling.style && (e.nextSibling.style.display = "block");
|
|
86
|
-
}, G = () => {
|
|
87
|
-
var t;
|
|
88
|
-
o.borderType === "bottom" && (k.value = !1);
|
|
89
|
-
const e = (t = s.value) == null ? void 0 : t.textarea;
|
|
90
|
-
e && e.nextSibling && e.nextSibling.style && (e.nextSibling.style.display = "none");
|
|
91
|
-
}, z = () => {
|
|
92
|
-
const e = o.size === "table" ? 12 : 14;
|
|
93
|
-
return ne(p.value, e);
|
|
94
|
-
};
|
|
95
|
-
y(
|
|
96
|
-
() => s.value,
|
|
97
|
-
(e) => {
|
|
98
|
-
setTimeout(() => {
|
|
99
|
-
var a, $;
|
|
100
|
-
const t = e;
|
|
101
|
-
t && (c.value = ((a = t == null ? void 0 : t.ref) == null ? void 0 : a.offsetWidth) ?? 0, v.value = u.value ? ($ = t == null ? void 0 : t.ref) == null ? void 0 : $.scrollWidth : z());
|
|
102
|
-
}, 200);
|
|
310
|
+
setup(e, { expose: o, emit: r }) {
|
|
311
|
+
const t = e, s = h(() => t.placeholder || pe("请输入")), c = h(() => t.disabled ? "disabled" : t.isView ? "view" : t.error ? "error" : "default"), u = h(() => {
|
|
312
|
+
var l, y;
|
|
313
|
+
return {
|
|
314
|
+
"--das-input-width": ge(t.width ?? V[t.size].defaultWidth),
|
|
315
|
+
"--das-input-height": V[t.size].height,
|
|
316
|
+
"--das-input-font-size": V[t.size].fontSize,
|
|
317
|
+
"--das-input-border-color": (l = D[c.value]) == null ? void 0 : l.color,
|
|
318
|
+
"--das-input-message-color": (y = D[c.value]) == null ? void 0 : y.color
|
|
319
|
+
};
|
|
320
|
+
}), d = h(() => [
|
|
321
|
+
"das-ui-input",
|
|
322
|
+
`das-ui-input--border-type-${t.borderType}`,
|
|
323
|
+
{
|
|
324
|
+
"das-ui-input--view": t.isView,
|
|
325
|
+
"das-ui-input--disabled": t.disabled,
|
|
326
|
+
"das-ui-textarea": t.type === "textarea"
|
|
103
327
|
}
|
|
104
|
-
)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}, 200), E.value = setTimeout(() => {
|
|
118
|
-
L.value = !1;
|
|
119
|
-
}, 200);
|
|
120
|
-
}, M = () => {
|
|
121
|
-
n.value = !0, m.value && clearTimeout(m.value);
|
|
122
|
-
}, W = () => {
|
|
123
|
-
m.value = setTimeout(() => {
|
|
124
|
-
n.value = !1;
|
|
125
|
-
}, 200);
|
|
328
|
+
]), n = r, f = h({
|
|
329
|
+
get: () => t.modelValue,
|
|
330
|
+
set: (l) => n("update:modelValue", l)
|
|
331
|
+
}), a = v(null), i = v(), { isOutside: m } = ke(h(() => {
|
|
332
|
+
var l;
|
|
333
|
+
return (l = i.value) == null ? void 0 : l.$el;
|
|
334
|
+
})), b = h(() => !m.value && t.errorMode === "overlay"), w = h(() => t.type === "textarea" ? t.showWordLimit : t.showTextWordLimit), p = h(() => t.isView || t.disabled), g = h(() => p.value ? t.noSetDefaultVal ? "" : "-" : s.value ?? ""), { showToolTip: $, tooltipContent: L } = Me({
|
|
335
|
+
elInputRef: i,
|
|
336
|
+
inputValue: f,
|
|
337
|
+
placeholder: s
|
|
338
|
+
}), { width: S } = ze(a), B = (l) => {
|
|
339
|
+
let y = l + "";
|
|
340
|
+
t.type !== "textarea" && t.filterSpace && (y = y.trim()), f.value = y, n("change", y);
|
|
126
341
|
};
|
|
127
|
-
return
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
return (e = B.value) == null ? void 0 : e.$tooltipRef.popperRef.contentRef;
|
|
131
|
-
},
|
|
132
|
-
(e) => {
|
|
133
|
-
e && (e.addEventListener("mouseenter", M), e.addEventListener("mouseleave", W));
|
|
134
|
-
}
|
|
135
|
-
), y(
|
|
136
|
-
() => n.value,
|
|
137
|
-
(e) => {
|
|
138
|
-
var t;
|
|
139
|
-
if (!e) {
|
|
140
|
-
const a = (t = B.value) == null ? void 0 : t.$tooltipRef.popperRef.contentRef;
|
|
141
|
-
a && (a.removeEventListener("mouseenter", M), a.removeEventListener("mouseleave", W));
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
), g({
|
|
145
|
-
$refInput: s
|
|
146
|
-
}), (e, t) => (f(), b(
|
|
342
|
+
return o({
|
|
343
|
+
elInputRef: i
|
|
344
|
+
}), (l, y) => (T(), P(
|
|
147
345
|
"div",
|
|
148
346
|
{
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
{ "das-input-normal-size": e.size === "default" },
|
|
154
|
-
{ "das-input-table-size": e.size === "table" }
|
|
155
|
-
])
|
|
347
|
+
ref_key: "containerRef",
|
|
348
|
+
ref: a,
|
|
349
|
+
style: ne(u.value),
|
|
350
|
+
class: A(d.value)
|
|
156
351
|
},
|
|
157
352
|
[
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
ref_key: "inputTooltipRef",
|
|
161
|
-
ref: B,
|
|
353
|
+
_(" 这里tooltip不能使用v-model:visible 有响应问题 "),
|
|
354
|
+
M(O(me), {
|
|
162
355
|
effect: "light",
|
|
163
356
|
placement: "top",
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
disabled: !O.value,
|
|
167
|
-
content: P.value
|
|
357
|
+
disabled: !O($),
|
|
358
|
+
content: O(L)
|
|
168
359
|
}, {
|
|
169
|
-
default:
|
|
170
|
-
|
|
171
|
-
ref_key: "
|
|
172
|
-
ref:
|
|
173
|
-
},
|
|
174
|
-
modelValue:
|
|
175
|
-
"onUpdate:modelValue":
|
|
176
|
-
placeholder:
|
|
177
|
-
disabled:
|
|
178
|
-
readonly:
|
|
179
|
-
type:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
],
|
|
186
|
-
autosize: o.autosize,
|
|
187
|
-
showWordLimit: Z.value,
|
|
188
|
-
maxlength: F.value,
|
|
189
|
-
onChange: j,
|
|
190
|
-
onFocus: q,
|
|
191
|
-
onBlur: G,
|
|
192
|
-
onMouseenter: H,
|
|
193
|
-
onMouseleave: J
|
|
194
|
-
}), te({
|
|
360
|
+
default: C(() => [
|
|
361
|
+
M(O(fe), ae({
|
|
362
|
+
ref_key: "elInputRef",
|
|
363
|
+
ref: i
|
|
364
|
+
}, l.$attrs, {
|
|
365
|
+
modelValue: f.value,
|
|
366
|
+
"onUpdate:modelValue": y[0] || (y[0] = (W) => f.value = W),
|
|
367
|
+
placeholder: g.value,
|
|
368
|
+
disabled: l.disabled,
|
|
369
|
+
readonly: l.isView,
|
|
370
|
+
type: t.type,
|
|
371
|
+
autosize: t.autosize,
|
|
372
|
+
showWordLimit: w.value,
|
|
373
|
+
maxlength: t.maxlength,
|
|
374
|
+
onChange: B
|
|
375
|
+
}), le({
|
|
195
376
|
_: 2
|
|
196
377
|
/* DYNAMIC */
|
|
197
378
|
}, [
|
|
198
|
-
|
|
379
|
+
l.$slots.prepend ? {
|
|
199
380
|
name: "prepend",
|
|
200
|
-
fn:
|
|
201
|
-
|
|
202
|
-
|
|
381
|
+
fn: C(() => [
|
|
382
|
+
_(" 输入框前置内容 "),
|
|
383
|
+
k(l.$slots, "prepend", {}, void 0, !0)
|
|
203
384
|
]),
|
|
204
385
|
key: "0"
|
|
205
386
|
} : void 0,
|
|
206
|
-
|
|
387
|
+
l.$slots.append ? {
|
|
207
388
|
name: "append",
|
|
208
|
-
fn:
|
|
209
|
-
|
|
210
|
-
|
|
389
|
+
fn: C(() => [
|
|
390
|
+
_(" 输入框后置内容 "),
|
|
391
|
+
k(l.$slots, "append", {}, void 0, !0)
|
|
211
392
|
]),
|
|
212
393
|
key: "1"
|
|
213
394
|
} : void 0,
|
|
214
|
-
|
|
395
|
+
l.$slots.suffix ? {
|
|
215
396
|
name: "suffix",
|
|
216
|
-
fn:
|
|
217
|
-
|
|
397
|
+
fn: C(() => [
|
|
398
|
+
k(l.$slots, "suffix", {}, void 0, !0)
|
|
218
399
|
]),
|
|
219
400
|
key: "2"
|
|
220
401
|
} : void 0,
|
|
221
|
-
|
|
402
|
+
l.$slots.prefix ? {
|
|
222
403
|
name: "prefix",
|
|
223
|
-
fn:
|
|
224
|
-
|
|
404
|
+
fn: C(() => [
|
|
405
|
+
k(l.$slots, "prefix", {}, void 0, !0)
|
|
225
406
|
]),
|
|
226
407
|
key: "3"
|
|
227
408
|
} : void 0
|
|
228
|
-
]), 1040, ["modelValue", "placeholder", "disabled", "readonly", "type", "
|
|
409
|
+
]), 1040, ["modelValue", "placeholder", "disabled", "readonly", "type", "autosize", "showWordLimit", "maxlength"])
|
|
229
410
|
]),
|
|
230
411
|
_: 3
|
|
231
412
|
/* FORWARDED */
|
|
232
|
-
}, 8, ["
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
ve,
|
|
237
|
-
D(e.successLabel),
|
|
238
|
-
1
|
|
239
|
-
/* TEXT */
|
|
240
|
-
)) : i("v-if", !0)
|
|
241
|
-
])) : i("v-if", !0),
|
|
242
|
-
e.error && e.errorLabel ? (f(), b(
|
|
243
|
-
oe,
|
|
244
|
-
{ key: 1 },
|
|
413
|
+
}, 8, ["disabled", "content"]),
|
|
414
|
+
l.error && l.errorLabel ? (T(), P(
|
|
415
|
+
se,
|
|
416
|
+
{ key: 0 },
|
|
245
417
|
[
|
|
246
|
-
|
|
247
|
-
|
|
418
|
+
l.errorMode === "default" ? (T(), P("div", De, [
|
|
419
|
+
l.error ? ue((T(), P("span", {
|
|
248
420
|
key: 0,
|
|
249
|
-
class:
|
|
250
|
-
title:
|
|
251
|
-
},
|
|
252
|
-
|
|
253
|
-
|
|
421
|
+
class: A(["das-input-message_content", { "is-ellipsis": l.isErrorTitle }]),
|
|
422
|
+
title: l.isErrorTitle ? l.errorLabel : ""
|
|
423
|
+
}, [
|
|
424
|
+
de(
|
|
425
|
+
ce(l.errorLabel),
|
|
426
|
+
1
|
|
427
|
+
/* TEXT */
|
|
428
|
+
)
|
|
429
|
+
], 10, Ne)), [
|
|
430
|
+
[O(ye)]
|
|
431
|
+
]) : _("v-if", !0)
|
|
432
|
+
])) : _("v-if", !0),
|
|
433
|
+
b.value ? (T(), ie(O(he), {
|
|
254
434
|
key: 1,
|
|
255
|
-
errorLabel:
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
435
|
+
errorLabel: l.errorLabel,
|
|
436
|
+
errorWidth: `${O(S)}`,
|
|
437
|
+
getEl: () => {
|
|
438
|
+
var W;
|
|
439
|
+
return (W = i.value) == null ? void 0 : W.$el;
|
|
440
|
+
},
|
|
441
|
+
errorModelZIndex: l.errorModelZIndex
|
|
442
|
+
}, null, 8, ["errorLabel", "errorWidth", "getEl", "errorModelZIndex"])) : _("v-if", !0)
|
|
259
443
|
],
|
|
260
444
|
64
|
|
261
445
|
/* STABLE_FRAGMENT */
|
|
262
|
-
)) :
|
|
446
|
+
)) : _("v-if", !0)
|
|
263
447
|
],
|
|
264
448
|
6
|
|
265
449
|
/* CLASS, STYLE */
|
|
266
450
|
));
|
|
267
451
|
}
|
|
268
|
-
}),
|
|
269
|
-
const
|
|
270
|
-
for (const [
|
|
271
|
-
|
|
272
|
-
return
|
|
273
|
-
},
|
|
452
|
+
}), Xe = (e, o) => {
|
|
453
|
+
const r = e.__vccOpts || e;
|
|
454
|
+
for (const [t, s] of o)
|
|
455
|
+
r[t] = s;
|
|
456
|
+
return r;
|
|
457
|
+
}, Ye = /* @__PURE__ */ Xe(Qe, [["__scopeId", "data-v-765411f7"]]), Ue = {
|
|
274
458
|
"--das-ui-input-default-text-color": "#212121",
|
|
275
459
|
"--das-ui-input-default-placeholder-text-color": "#B2B2B2",
|
|
276
460
|
"--das-ui-input-full-border-color": "#D9D9D9",
|
|
@@ -287,15 +471,15 @@ const de = ["auto", "fit-content", "inherit", "initial", "max-content", "min-con
|
|
|
287
471
|
"--das-ui-input-only-bottom-view-border-color": "#E5E5E5",
|
|
288
472
|
"--das-ui-input-success-color": "#1BA854",
|
|
289
473
|
"--das-ui-input-error-color": "#FB2323"
|
|
290
|
-
},
|
|
474
|
+
}, je = {
|
|
291
475
|
共: { "zh-CN": "共", en: "Total", _appCode: "framework" },
|
|
292
476
|
项: { "zh-CN": "项", en: "Item", _appCode: "framework" },
|
|
293
477
|
请输入: { "zh-CN": "请输入", en: "Please enter", _appCode: "framework" }
|
|
294
478
|
};
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
const
|
|
479
|
+
ve(je);
|
|
480
|
+
J(Ue);
|
|
481
|
+
const rt = q(Ye);
|
|
298
482
|
export {
|
|
299
|
-
|
|
300
|
-
|
|
483
|
+
rt as DasInput,
|
|
484
|
+
rt as default
|
|
301
485
|
};
|