ep-craft 0.1.26 → 0.1.28
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/components/date-picker/src/date-picker.js +38 -34
- package/dist/components/date-picker/src/props.js +19 -7
- package/dist/components/form/EpForm.vue.d.ts +61 -0
- package/dist/components/form/EpForm.vue.js +199 -0
- package/dist/components/form/EpForm2.vue.js +4 -0
- package/dist/components/form/index.d.ts +12 -2
- package/dist/components/form/index.js +9 -3
- package/dist/components/form/instance.d.ts +2 -0
- package/dist/components/form/src/form-item.d.ts +103 -0
- package/dist/components/form/src/form-item.js +91 -0
- package/dist/components/form/src/form-label-wrap.d.ts +11 -0
- package/dist/components/form/src/form-label-wrap.js +74 -0
- package/dist/components/form/src/form.d.ts +127 -0
- package/dist/components/form/src/form.js +112 -0
- package/dist/components/form/src/types.d.ts +48 -19
- package/dist/components/form/src/utils.d.ts +9 -0
- package/dist/components/form/src/utils.js +45 -0
- package/dist/components/form-item/EpFormItem.vue.d.ts +55 -0
- package/dist/components/form-item/EpFormItem.vue.js +257 -0
- package/dist/components/form-item/EpFormItem2.vue.js +4 -0
- package/dist/components/form-item/index.d.ts +5 -2
- package/dist/components/form-item/index.js +5 -3
- package/dist/components/form-item/instance.d.ts +2 -0
- package/dist/components/scrollbar/index.d.ts +1 -0
- package/dist/components/scrollbar/src/util.d.ts +40 -0
- package/dist/components/scrollbar/src/util.js +25 -0
- package/dist/components/select/select.vue.d.ts +9 -9
- package/dist/components/select/src/useSelect.d.ts +3 -3
- package/dist/components/select-v2/index.d.ts +6 -2
- package/dist/components/select-v2/index.js +7 -4
- package/dist/components/select-v2/src/defaults.d.ts +258 -0
- package/dist/components/select-v2/src/defaults.js +359 -0
- package/dist/components/select-v2/src/group-item.vue.d.ts +40 -0
- package/dist/components/select-v2/src/group-item.vue.js +13 -0
- package/dist/components/select-v2/src/group-item2.vue.js +33 -0
- package/dist/components/select-v2/src/option-item.vue.d.ts +66 -0
- package/dist/components/select-v2/src/option-item.vue.js +37 -0
- package/dist/components/select-v2/src/option-item2.vue.js +46 -0
- package/dist/components/select-v2/src/select-dropdown.d.ts +53 -0
- package/dist/components/select-v2/src/select-dropdown.js +209 -0
- package/dist/components/select-v2/src/select.types.d.ts +2 -1
- package/dist/components/select-v2/src/select.vue.d.ts +918 -0
- package/dist/components/select-v2/src/select.vue.js +388 -0
- package/dist/components/select-v2/src/select2.vue.js +86 -0
- package/dist/components/select-v2/src/token.d.ts +16 -0
- package/dist/components/select-v2/src/token.js +6 -0
- package/dist/components/select-v2/src/useAllowCreate.d.ts +8 -0
- package/dist/components/select-v2/src/useAllowCreate.js +64 -0
- package/dist/components/select-v2/src/useOption.d.ts +7 -0
- package/dist/components/select-v2/src/useOption.js +13 -0
- package/dist/components/select-v2/src/useProps.d.ts +2 -3
- package/dist/components/select-v2/src/useSelect.d.ts +129 -0
- package/dist/components/select-v2/src/useSelect.js +501 -0
- package/dist/components/time-picker/index.js +10 -11
- package/dist/components/time-picker/src/common/picker.vue.d.ts +131 -125
- package/dist/components/time-picker/src/common/picker.vue.js +163 -160
- package/dist/components/time-picker/src/common/props.d.ts +0 -1
- package/dist/components/time-picker/src/common/props.js +13 -14
- package/dist/components/time-picker/src/time-picker.d.ts +0 -3
- package/dist/components/virtual-list/index.d.ts +8 -0
- package/dist/components/virtual-list/src/builders/build-list.d.ts +187 -0
- package/dist/components/virtual-list/src/builders/build-list.js +363 -0
- package/dist/components/virtual-list/src/components/dynamic-size-list.d.ts +186 -0
- package/dist/components/virtual-list/src/components/dynamic-size-list.js +112 -0
- package/dist/components/virtual-list/src/components/fixed-size-list.d.ts +185 -0
- package/dist/components/virtual-list/src/components/fixed-size-list.js +68 -0
- package/dist/components/virtual-list/src/components/scrollbar.d.ts +79 -0
- package/dist/components/virtual-list/src/components/scrollbar.js +134 -0
- package/dist/components/virtual-list/src/defaults.d.ts +27 -0
- package/dist/components/virtual-list/src/defaults.js +26 -0
- package/dist/components/virtual-list/src/hooks/use-cache.d.ts +1 -0
- package/dist/components/virtual-list/src/hooks/use-cache.js +13 -0
- package/dist/components/virtual-list/src/hooks/use-wheel.d.ts +13 -0
- package/dist/components/virtual-list/src/hooks/use-wheel.js +26 -0
- package/dist/components/virtual-list/src/props.d.ts +211 -0
- package/dist/components/virtual-list/src/props.js +151 -0
- package/dist/components/virtual-list/src/types.d.ts +152 -0
- package/dist/components/virtual-list/src/utils.d.ts +16 -0
- package/dist/components/virtual-list/src/utils.js +22 -0
- package/dist/hooks/use-float-label/index.d.ts +6 -2
- package/dist/hooks/use-float-label/index.js +11 -7
- package/dist/index.css +1 -1
- package/dist/utils/objects.js +11 -3
- package/dist/vendored-components.d.ts +1 -1
- package/dist/vendored-components.js +1 -0
- package/package.json +3 -1
- package/theme-chalk/src/float-label.scss +57 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { defineComponent as be, useSlots as ye, inject as K, ref as I, computed as a, watch as z, reactive as Ie, toRefs as Fe, provide as Se, onMounted as Ve, onBeforeUnmount as qe, openBlock as U, createElementBlock as we, unref as v, normalizeClass as F, createVNode as H, withCtx as _, createBlock as We, resolveDynamicComponent as Me, normalizeStyle as J, renderSlot as B, createTextVNode as Re, toDisplayString as O, createCommentVNode as Q, createElementVNode as X, TransitionGroup as $e, nextTick as ze } from "vue";
|
|
2
|
+
import _e from "async-validator";
|
|
3
|
+
import { refDebounced as Be } from "@vueuse/core";
|
|
4
|
+
import { isBoolean as Ne } from "../../utils/types.js";
|
|
5
|
+
import { castArray as Y, cloneDeep as Z } from "lodash-unified";
|
|
6
|
+
import { isArray as k, isFunction as Pe } from "@vue/shared";
|
|
7
|
+
import { getProp as N } from "../../utils/objects.js";
|
|
8
|
+
import { addUnit as C } from "../../utils/dom/style.js";
|
|
9
|
+
import "@element-plus/icons-vue";
|
|
10
|
+
import { useNamespace as Ee } from "../../hooks/use-namespace/index.js";
|
|
11
|
+
import { useId as Ae } from "../../hooks/use-id/index.js";
|
|
12
|
+
import "../../hooks/use-size/index.js";
|
|
13
|
+
import "@popperjs/core";
|
|
14
|
+
import "../../hooks/use-z-index/index.js";
|
|
15
|
+
import "../../hooks/use-delayed-toggle/index.js";
|
|
16
|
+
import "../../hooks/use-aria/index.js";
|
|
17
|
+
import "../../hooks/use-model-toggle/index.js";
|
|
18
|
+
import "../../hooks/use-empty-values/index.js";
|
|
19
|
+
import { useFormSize as De } from "../form/src/hooks/use-form-common-props.js";
|
|
20
|
+
import je from "../form/src/form-label-wrap.js";
|
|
21
|
+
import { formContextKey as Le, formItemContextKey as x } from "../form/src/constants.js";
|
|
22
|
+
const Te = ["role", "aria-labelledby"], ut = /* @__PURE__ */ be({
|
|
23
|
+
name: "ElFormItem",
|
|
24
|
+
__name: "EpFormItem",
|
|
25
|
+
props: {
|
|
26
|
+
label: {},
|
|
27
|
+
labelWidth: {},
|
|
28
|
+
labelPosition: { default: "" },
|
|
29
|
+
prop: {},
|
|
30
|
+
required: { type: Boolean, default: void 0 },
|
|
31
|
+
rules: {},
|
|
32
|
+
error: {},
|
|
33
|
+
validateStatus: {},
|
|
34
|
+
for: {},
|
|
35
|
+
inlineMessage: { type: Boolean, default: void 0 },
|
|
36
|
+
showMessage: { type: Boolean, default: !0 },
|
|
37
|
+
size: {}
|
|
38
|
+
},
|
|
39
|
+
setup(P, { expose: ee }) {
|
|
40
|
+
const s = P, E = ye(), e = K(Le, void 0), te = K(x, void 0), S = De(void 0, { formItem: !1 }), o = Ee("form-item"), V = Ae().value, d = I([]), p = I(""), re = Be(p, 100), u = I(""), A = I();
|
|
41
|
+
let q, h = !1;
|
|
42
|
+
const g = a(
|
|
43
|
+
() => s.labelPosition || (e == null ? void 0 : e.labelPosition)
|
|
44
|
+
), D = a(() => g.value === "top" ? {} : { width: C(s.labelWidth ?? (e == null ? void 0 : e.labelWidth)) }), se = a(() => {
|
|
45
|
+
if (g.value === "top" || e != null && e.inline)
|
|
46
|
+
return {};
|
|
47
|
+
if (!s.label && !s.labelWidth && oe)
|
|
48
|
+
return {};
|
|
49
|
+
const t = C(s.labelWidth ?? (e == null ? void 0 : e.labelWidth));
|
|
50
|
+
return !s.label && !E.label ? { marginLeft: t } : {};
|
|
51
|
+
}), ie = a(() => [
|
|
52
|
+
o.b(),
|
|
53
|
+
o.m(S.value),
|
|
54
|
+
o.is("error", p.value === "error"),
|
|
55
|
+
o.is("validating", p.value === "validating"),
|
|
56
|
+
o.is("success", p.value === "success"),
|
|
57
|
+
o.is("required", de.value || s.required),
|
|
58
|
+
o.is("no-asterisk", e == null ? void 0 : e.hideRequiredAsterisk),
|
|
59
|
+
(e == null ? void 0 : e.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left",
|
|
60
|
+
{
|
|
61
|
+
[o.m("feedback")]: e == null ? void 0 : e.statusIcon,
|
|
62
|
+
[o.m(`label-${g.value}`)]: g.value
|
|
63
|
+
}
|
|
64
|
+
]), le = a(
|
|
65
|
+
() => Ne(s.inlineMessage) ? s.inlineMessage : (e == null ? void 0 : e.inlineMessage) || !1
|
|
66
|
+
), ae = a(() => [
|
|
67
|
+
o.e("error"),
|
|
68
|
+
{ [o.em("error", "inline")]: le.value }
|
|
69
|
+
]), w = a(() => s.prop ? k(s.prop) ? s.prop.join(".") : s.prop : ""), j = a(() => !!(s.label || E.label)), W = a(() => s.for ?? (d.value.length === 1 ? d.value[0] : void 0)), M = a(() => !W.value && j.value), oe = !!te, b = a(() => {
|
|
70
|
+
const t = e == null ? void 0 : e.model;
|
|
71
|
+
if (!(!t || !s.prop))
|
|
72
|
+
return N(t, s.prop).value;
|
|
73
|
+
}), R = a(() => {
|
|
74
|
+
const { required: t } = s, r = [];
|
|
75
|
+
s.rules && r.push(...Y(s.rules));
|
|
76
|
+
const i = e == null ? void 0 : e.rules;
|
|
77
|
+
if (i && s.prop) {
|
|
78
|
+
const l = N(
|
|
79
|
+
i,
|
|
80
|
+
s.prop
|
|
81
|
+
).value;
|
|
82
|
+
l && r.push(...Y(l));
|
|
83
|
+
}
|
|
84
|
+
if (t !== void 0) {
|
|
85
|
+
const l = r.map((n, m) => [n, m]).filter(([n]) => "required" in n);
|
|
86
|
+
if (l.length > 0)
|
|
87
|
+
for (const [n, m] of l)
|
|
88
|
+
n.required !== t && (r[m] = { ...n, required: t });
|
|
89
|
+
else
|
|
90
|
+
r.push({ required: t });
|
|
91
|
+
}
|
|
92
|
+
return r;
|
|
93
|
+
}), ue = a(() => R.value.length > 0), ne = (t) => R.value.filter((i) => !i.trigger || !t ? !0 : k(i.trigger) ? i.trigger.includes(t) : i.trigger === t).map(({ trigger: i, ...l }) => l), de = a(
|
|
94
|
+
() => R.value.some((t) => t.required)
|
|
95
|
+
), pe = a(
|
|
96
|
+
() => re.value === "error" && s.showMessage && ((e == null ? void 0 : e.showMessage) ?? !0)
|
|
97
|
+
), L = a(
|
|
98
|
+
() => `${s.label || ""}${(e == null ? void 0 : e.labelSuffix) || ""}`
|
|
99
|
+
), c = (t) => {
|
|
100
|
+
p.value = t;
|
|
101
|
+
}, ve = (t) => {
|
|
102
|
+
var l;
|
|
103
|
+
const { errors: r, fields: i } = t;
|
|
104
|
+
(!r || !i) && console.error(t), c("error"), u.value = r ? ((l = r == null ? void 0 : r[0]) == null ? void 0 : l.message) ?? `${s.prop} is required` : "", e == null || e.emit("validate", s.prop, !1, u.value);
|
|
105
|
+
}, ce = () => {
|
|
106
|
+
c("success"), e == null || e.emit("validate", s.prop, !0, "");
|
|
107
|
+
}, me = async (t) => {
|
|
108
|
+
const r = w.value;
|
|
109
|
+
return new _e({
|
|
110
|
+
[r]: t
|
|
111
|
+
}).validate({ [r]: b.value }, { firstFields: !0 }).then(() => (ce(), !0)).catch((l) => (ve(l), Promise.reject(l)));
|
|
112
|
+
}, T = async (t, r) => {
|
|
113
|
+
if (h || !s.prop)
|
|
114
|
+
return !1;
|
|
115
|
+
const i = Pe(r);
|
|
116
|
+
if (!ue.value)
|
|
117
|
+
return r == null || r(!1), !1;
|
|
118
|
+
const l = ne(t);
|
|
119
|
+
return l.length === 0 ? (r == null || r(!0), !0) : (c("validating"), me(l).then(() => (r == null || r(!0), !0)).catch((n) => {
|
|
120
|
+
const { fields: m } = n;
|
|
121
|
+
return r == null || r(!1, m), i ? !1 : Promise.reject(m);
|
|
122
|
+
}));
|
|
123
|
+
}, $ = () => {
|
|
124
|
+
c(""), u.value = "", h = !1;
|
|
125
|
+
}, G = async () => {
|
|
126
|
+
const t = e == null ? void 0 : e.model;
|
|
127
|
+
if (!t || !s.prop) return;
|
|
128
|
+
const r = N(t, s.prop);
|
|
129
|
+
h = !0, r.value = Z(q), await ze(), $(), h = !1;
|
|
130
|
+
}, fe = (t) => {
|
|
131
|
+
d.value.includes(t) || d.value.push(t);
|
|
132
|
+
}, he = (t) => {
|
|
133
|
+
d.value = d.value.filter((r) => r !== t);
|
|
134
|
+
}, y = (t) => {
|
|
135
|
+
q = Z(t);
|
|
136
|
+
}, ge = () => q;
|
|
137
|
+
z(
|
|
138
|
+
() => s.error,
|
|
139
|
+
(t) => {
|
|
140
|
+
u.value = t || "", c(t ? "error" : "");
|
|
141
|
+
},
|
|
142
|
+
{ immediate: !0 }
|
|
143
|
+
), z(
|
|
144
|
+
() => s.validateStatus,
|
|
145
|
+
(t) => c(t || "")
|
|
146
|
+
);
|
|
147
|
+
const f = Ie({
|
|
148
|
+
...Fe(s),
|
|
149
|
+
$el: A,
|
|
150
|
+
size: S,
|
|
151
|
+
validateMessage: u,
|
|
152
|
+
validateState: p,
|
|
153
|
+
labelId: V,
|
|
154
|
+
inputIds: d,
|
|
155
|
+
isGroup: M,
|
|
156
|
+
hasLabel: j,
|
|
157
|
+
fieldValue: b,
|
|
158
|
+
addInputId: fe,
|
|
159
|
+
removeInputId: he,
|
|
160
|
+
resetField: G,
|
|
161
|
+
clearValidate: $,
|
|
162
|
+
validate: T,
|
|
163
|
+
propString: w,
|
|
164
|
+
setInitialValue: y,
|
|
165
|
+
getInitialValue: ge
|
|
166
|
+
});
|
|
167
|
+
return Se(x, f), z(w, (t, r) => {
|
|
168
|
+
!e || !r || (e.removeField(f, r), t && (y(b.value), e.addField(f)));
|
|
169
|
+
}), Ve(() => {
|
|
170
|
+
s.prop && (y(b.value), e == null || e.addField(f));
|
|
171
|
+
}), qe(() => {
|
|
172
|
+
e == null || e.removeField(f);
|
|
173
|
+
}), ee({
|
|
174
|
+
/**
|
|
175
|
+
* @description Form item size.
|
|
176
|
+
*/
|
|
177
|
+
size: S,
|
|
178
|
+
/**
|
|
179
|
+
* @description Validation message.
|
|
180
|
+
*/
|
|
181
|
+
validateMessage: u,
|
|
182
|
+
/**
|
|
183
|
+
* @description Validation state.
|
|
184
|
+
*/
|
|
185
|
+
validateState: p,
|
|
186
|
+
/**
|
|
187
|
+
* @description Validate form item.
|
|
188
|
+
*/
|
|
189
|
+
validate: T,
|
|
190
|
+
/**
|
|
191
|
+
* @description Remove validation status of the field.
|
|
192
|
+
*/
|
|
193
|
+
clearValidate: $,
|
|
194
|
+
/**
|
|
195
|
+
* @description Reset current field and remove validation result.
|
|
196
|
+
*/
|
|
197
|
+
resetField: G,
|
|
198
|
+
/**
|
|
199
|
+
* @description Set initial value for this field. When `resetField` is called, the field will reset to this value.
|
|
200
|
+
*/
|
|
201
|
+
setInitialValue: y
|
|
202
|
+
}), (t, r) => {
|
|
203
|
+
var i;
|
|
204
|
+
return U(), we("div", {
|
|
205
|
+
ref_key: "formItemRef",
|
|
206
|
+
ref: A,
|
|
207
|
+
class: F(ie.value),
|
|
208
|
+
role: M.value ? "group" : void 0,
|
|
209
|
+
"aria-labelledby": M.value ? v(V) : void 0
|
|
210
|
+
}, [
|
|
211
|
+
H(v(je), {
|
|
212
|
+
"is-auto-width": D.value.width === "auto",
|
|
213
|
+
"update-all": ((i = v(e)) == null ? void 0 : i.labelWidth) === "auto"
|
|
214
|
+
}, {
|
|
215
|
+
default: _(() => [
|
|
216
|
+
P.label || t.$slots.label ? (U(), We(Me(W.value ? "label" : "div"), {
|
|
217
|
+
key: 0,
|
|
218
|
+
id: v(V),
|
|
219
|
+
for: W.value,
|
|
220
|
+
class: F(v(o).e("label")),
|
|
221
|
+
style: J(D.value)
|
|
222
|
+
}, {
|
|
223
|
+
default: _(() => [
|
|
224
|
+
B(t.$slots, "label", { label: L.value }, () => [
|
|
225
|
+
Re(O(L.value), 1)
|
|
226
|
+
])
|
|
227
|
+
]),
|
|
228
|
+
_: 3
|
|
229
|
+
}, 8, ["id", "for", "class", "style"])) : Q("", !0)
|
|
230
|
+
]),
|
|
231
|
+
_: 3
|
|
232
|
+
}, 8, ["is-auto-width", "update-all"]),
|
|
233
|
+
X("div", {
|
|
234
|
+
class: F(v(o).e("content")),
|
|
235
|
+
style: J(se.value)
|
|
236
|
+
}, [
|
|
237
|
+
B(t.$slots, "default"),
|
|
238
|
+
H($e, {
|
|
239
|
+
name: `${v(o).namespace.value}-zoom-in-top`
|
|
240
|
+
}, {
|
|
241
|
+
default: _(() => [
|
|
242
|
+
pe.value ? B(t.$slots, "error", { error: u.value }, () => [
|
|
243
|
+
X("div", {
|
|
244
|
+
class: F(ae.value)
|
|
245
|
+
}, O(u.value), 3)
|
|
246
|
+
], void 0, 0) : Q("", !0)
|
|
247
|
+
]),
|
|
248
|
+
_: 3
|
|
249
|
+
}, 8, ["name"])
|
|
250
|
+
], 6)
|
|
251
|
+
], 10, Te);
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
export {
|
|
256
|
+
ut as default
|
|
257
|
+
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { Plugin } from 'vue';
|
|
2
|
-
import
|
|
3
|
-
export declare const EpFormItem: typeof
|
|
2
|
+
import _EpFormItem from './EpFormItem.vue';
|
|
3
|
+
export declare const EpFormItem: typeof _EpFormItem & Plugin;
|
|
4
4
|
export default EpFormItem;
|
|
5
|
+
export { formItemProps, formItemValidateStates } from '../form/src/form-item';
|
|
6
|
+
export type { FormItemProp, FormItemProps, FormItemPropsPublic, FormItemValidateState, } from '../form/src/form-item';
|
|
7
|
+
export type { FormItemInstance } from './instance';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { ElFormItem as m } from "element-plus";
|
|
2
1
|
import { withInstall as t } from "../../utils/with-install.js";
|
|
3
|
-
|
|
2
|
+
import m from "./EpFormItem.vue.js";
|
|
3
|
+
import { formItemValidateStates as p } from "../form/src/form-item.js";
|
|
4
|
+
const e = t(m, "ep-form-item");
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
e as EpFormItem,
|
|
7
|
+
p as formItemValidateStates
|
|
6
8
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { CSSProperties } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* scrollbar 源码化子集 —— 仅为 virtual-list 的 scrollbar 包装提供工具导出。
|
|
4
|
+
*
|
|
5
|
+
* scrollbar 组件本体仍走薄包装(见 index.ts),此处仅补齐
|
|
6
|
+
* virtual-list/src/components/scrollbar 依赖的 `BAR_MAP` 等命名导出。
|
|
7
|
+
* 上游 renderThumbStyle 的入参类型引用 `Pick<ThumbProps, 'move' | 'size'>`,
|
|
8
|
+
* 因本地未 vendor `thumb.ts`(ThumbProps 来源缺失),故将 `Pick<ThumbProps,
|
|
9
|
+
* 'move' | 'size'>` 就地内联为等价结构类型 `{ move?: number; size?: string }`
|
|
10
|
+
* (上游 `size` 为可选 string、`move` 为可选 number)。
|
|
11
|
+
*/
|
|
12
|
+
export declare const GAP = 4;
|
|
13
|
+
export declare const BAR_MAP: {
|
|
14
|
+
readonly vertical: {
|
|
15
|
+
readonly offset: "offsetHeight";
|
|
16
|
+
readonly scroll: "scrollTop";
|
|
17
|
+
readonly scrollSize: "scrollHeight";
|
|
18
|
+
readonly size: "height";
|
|
19
|
+
readonly key: "vertical";
|
|
20
|
+
readonly axis: "Y";
|
|
21
|
+
readonly client: "clientY";
|
|
22
|
+
readonly direction: "top";
|
|
23
|
+
};
|
|
24
|
+
readonly horizontal: {
|
|
25
|
+
readonly offset: "offsetWidth";
|
|
26
|
+
readonly scroll: "scrollLeft";
|
|
27
|
+
readonly scrollSize: "scrollWidth";
|
|
28
|
+
readonly size: "width";
|
|
29
|
+
readonly key: "horizontal";
|
|
30
|
+
readonly axis: "X";
|
|
31
|
+
readonly client: "clientX";
|
|
32
|
+
readonly direction: "left";
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare const renderThumbStyle: ({ move, size, bar, }: {
|
|
36
|
+
move?: number;
|
|
37
|
+
size?: string;
|
|
38
|
+
} & {
|
|
39
|
+
bar: (typeof BAR_MAP)[keyof typeof BAR_MAP];
|
|
40
|
+
}) => CSSProperties;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const l = {
|
|
2
|
+
vertical: {
|
|
3
|
+
offset: "offsetHeight",
|
|
4
|
+
scroll: "scrollTop",
|
|
5
|
+
scrollSize: "scrollHeight",
|
|
6
|
+
size: "height",
|
|
7
|
+
key: "vertical",
|
|
8
|
+
axis: "Y",
|
|
9
|
+
client: "clientY",
|
|
10
|
+
direction: "top"
|
|
11
|
+
},
|
|
12
|
+
horizontal: {
|
|
13
|
+
offset: "offsetWidth",
|
|
14
|
+
scroll: "scrollLeft",
|
|
15
|
+
scrollSize: "scrollWidth",
|
|
16
|
+
size: "width",
|
|
17
|
+
key: "horizontal",
|
|
18
|
+
axis: "X",
|
|
19
|
+
client: "clientX",
|
|
20
|
+
direction: "left"
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
l as BAR_MAP
|
|
25
|
+
};
|
|
@@ -92,7 +92,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
92
92
|
}>, {
|
|
93
93
|
modelValue: import("vue").ComputedRef<string | number | boolean | any[] | Record<string, any> | null | undefined>;
|
|
94
94
|
selectedLabel: import("vue").ComputedRef<string | string[]>;
|
|
95
|
-
floatLabelClass: import("vue").ComputedRef<
|
|
95
|
+
floatLabelClass: import("vue").ComputedRef<import("@element-plus/hooks").FloatLabelClass>;
|
|
96
96
|
floatLabelText: import("vue").ComputedRef<string>;
|
|
97
97
|
calculatorRef: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
98
98
|
inputStyle: import("vue").ComputedRef<{
|
|
@@ -184,12 +184,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
184
184
|
shouldShowPlaceholder: import("vue").ComputedRef<boolean>;
|
|
185
185
|
currentPlaceholder: import("vue").ComputedRef<string>;
|
|
186
186
|
mouseEnterEventName: string | null;
|
|
187
|
-
needStatusIcon: import("vue").ComputedRef<
|
|
187
|
+
needStatusIcon: import("vue").ComputedRef<boolean>;
|
|
188
188
|
showClearBtn: import("vue").ComputedRef<boolean>;
|
|
189
189
|
iconComponent: import("vue").ComputedRef<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
190
190
|
iconReverse: import("vue").ComputedRef<string>;
|
|
191
|
-
validateState: import("vue").ComputedRef<
|
|
192
|
-
validateIcon: import("vue").ComputedRef<
|
|
191
|
+
validateState: import("vue").ComputedRef<"" | "error" | "success" | "validating">;
|
|
192
|
+
validateIcon: import("vue").ComputedRef<import("vue").Component | "">;
|
|
193
193
|
showNewOption: import("vue").ComputedRef<boolean>;
|
|
194
194
|
updateOptions: () => void;
|
|
195
195
|
collapseTagSize: import("vue").ComputedRef<"default" | "small">;
|
|
@@ -369,11 +369,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
369
369
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
370
370
|
"onEnd-reached"?: ((direction: import("@element-plus/components/scrollbar").ScrollbarDirection) => any) | undefined;
|
|
371
371
|
"onVisible-change"?: ((visible: boolean) => any) | undefined;
|
|
372
|
+
"onRemove-tag"?: ((val: unknown) => any) | undefined;
|
|
372
373
|
"onPopup-scroll"?: ((args_0: {
|
|
373
374
|
scrollTop: number;
|
|
374
375
|
scrollLeft: number;
|
|
375
376
|
}) => any) | undefined;
|
|
376
|
-
"onRemove-tag"?: ((val: unknown) => any) | undefined;
|
|
377
377
|
}>, {
|
|
378
378
|
props: import("@element-plus/components/select-v2/src/useProps").Props;
|
|
379
379
|
offset: number;
|
|
@@ -407,12 +407,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
407
407
|
tagType: import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => "primary" | "success" | "warning" | "info" | "danger") | (() => "primary" | "success" | "warning" | "info" | "danger") | (((new (...args: any[]) => "primary" | "success" | "warning" | "info" | "danger") | (() => "primary" | "success" | "warning" | "info" | "danger")) | null)[], "primary" | "success" | "warning" | "info" | "danger", unknown>;
|
|
408
408
|
tagEffect: import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => "dark" | "light" | "plain") | (() => "dark" | "light" | "plain") | (((new (...args: any[]) => "dark" | "light" | "plain") | (() => "dark" | "light" | "plain")) | null)[], "dark" | "light" | "plain", unknown>;
|
|
409
409
|
automaticDropdown: boolean;
|
|
410
|
-
|
|
411
|
-
remote: boolean;
|
|
410
|
+
tagTooltip: import("./select").TagTooltipProps;
|
|
412
411
|
multipleLimit: number;
|
|
413
|
-
defaultFirstOption: boolean;
|
|
414
412
|
reserveKeyword: import("@element-plus/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
415
|
-
|
|
413
|
+
allowCreate: boolean;
|
|
414
|
+
defaultFirstOption: boolean;
|
|
415
|
+
remote: boolean;
|
|
416
416
|
remoteShowSuffix: boolean;
|
|
417
417
|
}, {}, {
|
|
418
418
|
ElSelectMenu: import("vue").DefineComponent<{}, {
|
|
@@ -81,12 +81,12 @@ export declare const useSelect: (props: SelectProps, emit: SelectEmits) => {
|
|
|
81
81
|
shouldShowPlaceholder: import("vue").ComputedRef<boolean>;
|
|
82
82
|
currentPlaceholder: import("vue").ComputedRef<string>;
|
|
83
83
|
mouseEnterEventName: string | null;
|
|
84
|
-
needStatusIcon: import("vue").ComputedRef<
|
|
84
|
+
needStatusIcon: import("vue").ComputedRef<boolean>;
|
|
85
85
|
showClearBtn: import("vue").ComputedRef<boolean>;
|
|
86
86
|
iconComponent: import("vue").ComputedRef<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown>>;
|
|
87
87
|
iconReverse: import("vue").ComputedRef<string>;
|
|
88
|
-
validateState: import("vue").ComputedRef<
|
|
89
|
-
validateIcon: import("vue").ComputedRef<
|
|
88
|
+
validateState: import("vue").ComputedRef<"" | "error" | "success" | "validating">;
|
|
89
|
+
validateIcon: import("vue").ComputedRef<Component | "">;
|
|
90
90
|
showNewOption: import("vue").ComputedRef<boolean>;
|
|
91
91
|
updateOptions: () => void;
|
|
92
92
|
collapseTagSize: import("vue").ComputedRef<"default" | "small">;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { Plugin } from 'vue';
|
|
2
|
-
import
|
|
3
|
-
export declare const EpSelectV2: typeof
|
|
2
|
+
import _EpSelectV2 from './src/select.vue';
|
|
3
|
+
export declare const EpSelectV2: typeof _EpSelectV2 & Plugin;
|
|
4
4
|
export default EpSelectV2;
|
|
5
|
+
export { selectV2Emits, selectV2Props } from './src/defaults';
|
|
6
|
+
export { selectV2InjectionKey } from './src/token';
|
|
7
|
+
export type { OptionV2EmitFn, OptionV2Props, OptionV2PropsPublic, SelectV2EmitFn, SelectV2Instance, SelectV2Props, SelectV2PropsPublic, } from './src/defaults';
|
|
8
|
+
export type { SelectV2Context } from './src/token';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { withInstall as e } from "../../utils/with-install.js";
|
|
2
|
+
import t from "./src/select.vue.js";
|
|
3
|
+
import { selectV2Emits as c, selectV2Props as m } from "./src/defaults.js";
|
|
4
|
+
const r = e(t, "ep-select-v2");
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
r as EpSelectV2,
|
|
7
|
+
c as selectV2Emits,
|
|
8
|
+
m as selectV2Props
|
|
6
9
|
};
|