ep-craft 0.1.32 → 0.1.34
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/button/index.d.ts +12 -0
- package/dist/components/button-group/index.d.ts +3 -2
- package/dist/components/button-group/index.js +7 -3
- package/dist/components/button-group/src/button-group.d.ts +48 -0
- package/dist/components/button-group/src/button-group.js +7 -0
- package/dist/components/button-group/src/button-group.vue.d.ts +16 -0
- package/dist/components/button-group/src/button-group.vue.js +42 -0
- package/dist/components/button-group/src/button-group2.vue.js +4 -0
- package/dist/components/checkbox/index.js +6 -5
- package/dist/components/collection/index.d.ts +8 -0
- package/dist/components/collection/src/collection-item.vue.d.ts +2 -0
- package/dist/components/collection/src/collection-item.vue.js +10 -0
- package/dist/components/collection/src/collection-item2.vue.js +8 -0
- package/dist/components/collection/src/collection.d.ts +39 -0
- package/dist/components/collection/src/collection.js +52 -0
- package/dist/components/collection/src/collection.vue.d.ts +2 -0
- package/dist/components/collection/src/collection.vue.js +10 -0
- package/dist/components/collection/src/collection2.vue.js +7 -0
- package/dist/components/collection/src/tokens.d.ts +18 -0
- package/dist/components/divider/index.d.ts +24 -2
- package/dist/components/divider/index.js +8 -3
- package/dist/components/divider/src/divider.d.ts +30 -0
- package/dist/components/divider/src/divider.js +34 -0
- package/dist/components/divider/src/divider.vue.d.ts +24 -0
- package/dist/components/divider/src/divider.vue.js +39 -0
- package/dist/components/divider/src/divider2.vue.js +4 -0
- package/dist/components/dropdown/index.d.ts +3017 -3
- package/dist/components/dropdown/index.js +23 -3
- package/dist/components/dropdown/src/dropdown-item-impl.vue.d.ts +79 -0
- package/dist/components/dropdown/src/dropdown-item-impl.vue.js +40 -0
- package/dist/components/dropdown/src/dropdown-item-impl2.vue.js +68 -0
- package/dist/components/dropdown/src/dropdown-item.vue.d.ts +169 -0
- package/dist/components/dropdown/src/dropdown-item.vue.js +35 -0
- package/dist/components/dropdown/src/dropdown-item2.vue.js +63 -0
- package/dist/components/dropdown/src/dropdown-menu.vue.d.ts +27 -0
- package/dist/components/dropdown/src/dropdown-menu.vue.js +24 -0
- package/dist/components/dropdown/src/dropdown-menu2.vue.js +75 -0
- package/dist/components/dropdown/src/dropdown.d.ts +200 -0
- package/dist/components/dropdown/src/dropdown.js +201 -0
- package/dist/components/dropdown/src/dropdown.vue.d.ts +1126 -0
- package/dist/components/dropdown/src/dropdown.vue.js +127 -0
- package/dist/components/dropdown/src/dropdown2.vue.js +127 -0
- package/dist/components/dropdown/src/instance.d.ts +2 -0
- package/dist/components/dropdown/src/tokens.d.ts +13 -0
- package/dist/components/dropdown/src/tokens.js +5 -0
- package/dist/components/dropdown/src/useDropdown.d.ts +5 -0
- package/dist/components/dropdown/src/useDropdown.js +15 -0
- package/dist/components/dropdown-item/index.d.ts +1 -4
- package/dist/components/dropdown-menu/index.d.ts +1 -4
- package/dist/components/index.js +129 -131
- package/dist/components/popover/index.d.ts +121 -3
- package/dist/components/popover/index.js +19 -4
- package/dist/components/popover/src/directive.d.ts +4 -0
- package/dist/components/popover/src/directive.js +15 -0
- package/dist/components/popover/src/popover.d.ts +291 -0
- package/dist/components/popover/src/popover.js +168 -0
- package/dist/components/popover/src/popover.vue.d.ts +53 -0
- package/dist/components/popover/src/popover.vue.js +125 -0
- package/dist/components/popover/src/popover2.vue.js +4 -0
- package/dist/components/progress/index.d.ts +35 -2
- package/dist/components/progress/index.js +10 -4
- package/dist/components/progress/src/progress.d.ts +97 -0
- package/dist/components/progress/src/progress.js +104 -0
- package/dist/components/progress/src/progress.vue.d.ts +30 -0
- package/dist/components/progress/src/progress.vue.js +179 -0
- package/dist/components/progress/src/progress2.vue.js +4 -0
- package/dist/components/roving-focus-group/index.d.ts +14 -0
- package/dist/components/roving-focus-group/index.js +15 -0
- package/dist/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts +50 -0
- package/dist/components/roving-focus-group/src/roving-focus-group-impl.vue.js +10 -0
- package/dist/components/roving-focus-group/src/roving-focus-group-impl2.vue.js +115 -0
- package/dist/components/roving-focus-group/src/roving-focus-group.d.ts +56 -0
- package/dist/components/roving-focus-group/src/roving-focus-group.js +43 -0
- package/dist/components/roving-focus-group/src/roving-focus-group.vue.d.ts +67 -0
- package/dist/components/roving-focus-group/src/roving-focus-group.vue.js +13 -0
- package/dist/components/roving-focus-group/src/roving-focus-group2.vue.js +21 -0
- package/dist/components/roving-focus-group/src/roving-focus-item.vue.d.ts +43 -0
- package/dist/components/roving-focus-group/src/roving-focus-item.vue.js +20 -0
- package/dist/components/roving-focus-group/src/roving-focus-item2.vue.js +78 -0
- package/dist/components/roving-focus-group/src/tokens.d.ts +28 -0
- package/dist/components/roving-focus-group/src/tokens.js +5 -0
- package/dist/components/roving-focus-group/src/utils.d.ts +8 -0
- package/dist/components/roving-focus-group/src/utils.js +28 -0
- package/dist/components/table/index.d.ts +56 -3
- package/dist/components/table/index.js +20 -4
- package/dist/components/table/src/composables/use-scrollbar.d.ts +6 -0
- package/dist/components/table/src/composables/use-scrollbar.js +24 -0
- package/dist/components/table/src/config.d.ts +87 -0
- package/dist/components/table/src/config.js +210 -0
- package/dist/components/table/src/filter-panel.vue.d.ts +837 -0
- package/dist/components/table/src/filter-panel.vue.js +130 -0
- package/dist/components/table/src/filter-panel2.vue.js +155 -0
- package/dist/components/table/src/h-helper.d.ts +13 -0
- package/dist/components/table/src/h-helper.js +30 -0
- package/dist/components/table/src/layout-observer.d.ts +8 -0
- package/dist/components/table/src/layout-observer.js +49 -0
- package/dist/components/table/src/store/current.d.ts +15 -0
- package/dist/components/table/src/store/current.js +45 -0
- package/dist/components/table/src/store/expand.d.ts +14 -0
- package/dist/components/table/src/store/expand.js +55 -0
- package/dist/components/table/src/store/helper.d.ts +548 -0
- package/dist/components/table/src/store/helper.js +61 -0
- package/dist/components/table/src/store/index.d.ts +1107 -0
- package/dist/components/table/src/store/index.js +123 -0
- package/dist/components/table/src/store/tree.d.ts +27 -0
- package/dist/components/table/src/store/tree.js +153 -0
- package/dist/components/table/src/store/watcher.d.ts +88 -0
- package/dist/components/table/src/store/watcher.js +483 -0
- package/dist/components/table/src/table/defaults.d.ts +560 -0
- package/dist/components/table/src/table/defaults.js +236 -0
- package/dist/components/table/src/table/key-render-helper.d.ts +2 -0
- package/dist/components/table/src/table/key-render-helper.js +18 -0
- package/dist/components/table/src/table/style-helper.d.ts +51 -0
- package/dist/components/table/src/table/style-helper.js +169 -0
- package/dist/components/table/src/table/utils-helper.d.ts +16 -0
- package/dist/components/table/src/table/utils-helper.js +36 -0
- package/dist/components/table/src/table-body/defaults.d.ts +39 -0
- package/dist/components/table/src/table-body/defaults.js +25 -0
- package/dist/components/table/src/table-body/events-helper.d.ts +19 -0
- package/dist/components/table/src/table-body/events-helper.js +126 -0
- package/dist/components/table/src/table-body/index.d.ts +84 -0
- package/dist/components/table/src/table-body/index.js +77 -0
- package/dist/components/table/src/table-body/render-helper.d.ts +18 -0
- package/dist/components/table/src/table-body/render-helper.js +188 -0
- package/dist/components/table/src/table-body/styles-helper.d.ts +15 -0
- package/dist/components/table/src/table-body/styles-helper.js +98 -0
- package/dist/components/table/src/table-body/td-wrapper.vue.d.ts +33 -0
- package/dist/components/table/src/table-body/td-wrapper.vue.js +26 -0
- package/dist/components/table/src/table-body/td-wrapper2.vue.js +4 -0
- package/dist/components/table/src/table-column/defaults.d.ts +348 -0
- package/dist/components/table/src/table-column/defaults.js +152 -0
- package/dist/components/table/src/table-column/index.d.ts +2 -0
- package/dist/components/table/src/table-column/index.vue.d.ts +32 -0
- package/dist/components/table/src/table-column/index.vue.js +161 -0
- package/dist/components/table/src/table-column/index2.vue.js +4 -0
- package/dist/components/table/src/table-column/render-helper.d.ts +17 -0
- package/dist/components/table/src/table-column/render-helper.js +116 -0
- package/dist/components/table/src/table-column/watcher-helper.d.ts +8 -0
- package/dist/components/table/src/table-column/watcher-helper.js +85 -0
- package/dist/components/table/src/table-footer/index.d.ts +79 -0
- package/dist/components/table/src/table-footer/index.js +110 -0
- package/dist/components/table/src/table-footer/mapState-helper.d.ts +9 -0
- package/dist/components/table/src/table-footer/mapState-helper.js +16 -0
- package/dist/components/table/src/table-footer/style-helper.d.ts +9 -0
- package/dist/components/table/src/table-footer/style-helper.js +42 -0
- package/dist/components/table/src/table-header/event-helper.d.ts +14 -0
- package/dist/components/table/src/table-header/event-helper.js +113 -0
- package/dist/components/table/src/table-header/index.d.ts +361 -0
- package/dist/components/table/src/table-header/index.js +255 -0
- package/dist/components/table/src/table-header/style.helper.d.ts +10 -0
- package/dist/components/table/src/table-header/style.helper.js +73 -0
- package/dist/components/table/src/table-header/utils-helper.d.ts +10 -0
- package/dist/components/table/src/table-header/utils-helper.js +45 -0
- package/dist/components/table/src/table-layout.d.ts +37 -0
- package/dist/components/table/src/table-layout.js +144 -0
- package/dist/components/table/src/table.vue.d.ts +734 -0
- package/dist/components/table/src/table.vue.js +443 -0
- package/dist/components/table/src/table2.vue.js +4 -0
- package/dist/components/table/src/tableColumn.d.ts +2 -0
- package/dist/components/table/src/tokens.d.ts +3 -0
- package/dist/components/table/src/tokens.js +4 -0
- package/dist/components/table/src/util.d.ts +55 -0
- package/dist/components/table/src/util.js +310 -0
- package/dist/components/table-column/index.d.ts +40 -3
- package/dist/components/table-column/index.js +6 -3
- package/dist/components/upload/index.d.ts +45 -2
- package/dist/components/upload/index.js +23 -4
- package/dist/components/upload/src/ajax.d.ts +9 -0
- package/dist/components/upload/src/ajax.js +58 -0
- package/dist/components/upload/src/constants.d.ts +5 -0
- package/dist/components/upload/src/constants.js +4 -0
- package/dist/components/upload/src/upload-content.d.ts +136 -0
- package/dist/components/upload/src/upload-content.js +53 -0
- package/dist/components/upload/src/upload-content.vue.d.ts +38 -0
- package/dist/components/upload/src/upload-content.vue.js +186 -0
- package/dist/components/upload/src/upload-content2.vue.js +4 -0
- package/dist/components/upload/src/upload-dragger.d.ts +22 -0
- package/dist/components/upload/src/upload-dragger.js +19 -0
- package/dist/components/upload/src/upload-dragger.vue.d.ts +19 -0
- package/dist/components/upload/src/upload-dragger.vue.js +91 -0
- package/dist/components/upload/src/upload-dragger2.vue.js +4 -0
- package/dist/components/upload/src/upload-list.d.ts +45 -0
- package/dist/components/upload/src/upload-list.js +39 -0
- package/dist/components/upload/src/upload-list.vue.d.ts +28 -0
- package/dist/components/upload/src/upload-list.vue.js +182 -0
- package/dist/components/upload/src/upload-list2.vue.js +4 -0
- package/dist/components/upload/src/upload.d.ts +361 -0
- package/dist/components/upload/src/upload.js +216 -0
- package/dist/components/upload/src/upload.vue.d.ts +64 -0
- package/dist/components/upload/src/upload.vue.js +150 -0
- package/dist/components/upload/src/upload2.vue.js +4 -0
- package/dist/components/upload/src/use-handlers.d.ts +60 -0
- package/dist/components/upload/src/use-handlers.js +111 -0
- package/dist/directives/mousewheel/index.js +28 -0
- package/dist/ep-craft.js +277 -236
- package/dist/index.d.ts +67 -0
- package/dist/utils/dom/event.js +12 -11
- package/dist/utils/objects.js +10 -9
- package/dist/utils/vue/install.js +21 -18
- package/dist/utils/vue/refs.js +8 -0
- package/dist/vendored-components.d.ts +1 -1
- package/dist/vendored-components.js +44 -4
- package/package.json +1 -1
- package/dist/components/dropdown-item/index.js +0 -6
- package/dist/components/dropdown-menu/index.js +0 -6
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { defineComponent as D, ref as F, computed as z, openBlock as o, createBlock as b, TransitionGroup as I, unref as e, normalizeClass as s, withCtx as u, createElementBlock as d, Fragment as S, renderList as V, withKeys as w, renderSlot as T, createCommentVNode as c, createElementVNode as g, withModifiers as $, createVNode as n, toDisplayString as x, normalizeStyle as O } from "vue";
|
|
2
|
+
import { ElIcon as y } from "../../icon/index.js";
|
|
3
|
+
import { Document as U, CircleCheck as G, Check as M, Close as R, ZoomIn as Z, Delete as j } from "@element-plus/icons-vue";
|
|
4
|
+
import { useNamespace as C } from "../../../hooks/use-namespace/index.js";
|
|
5
|
+
import { NOOP as q } from "@vue/shared";
|
|
6
|
+
import "lodash-unified";
|
|
7
|
+
import "@vueuse/core";
|
|
8
|
+
import { mutable as A } from "../../../utils/typescript.js";
|
|
9
|
+
import { useLocale as H } from "../../../hooks/use-locale/index.js";
|
|
10
|
+
import "../../../hooks/use-size/index.js";
|
|
11
|
+
import "@popperjs/core";
|
|
12
|
+
import "../../../hooks/use-z-index/index.js";
|
|
13
|
+
import "../../../hooks/use-delayed-toggle/index.js";
|
|
14
|
+
import "../../../hooks/use-aria/index.js";
|
|
15
|
+
import "../../../hooks/use-model-toggle/index.js";
|
|
16
|
+
import "../../../hooks/use-empty-values/index.js";
|
|
17
|
+
import { EpProgress as J } from "../../progress/index.js";
|
|
18
|
+
import "../../form/index.js";
|
|
19
|
+
import { uploadListEmits as Q } from "./upload-list.js";
|
|
20
|
+
import { useFormDisabled as W } from "../../form/src/hooks/use-form-common-props.js";
|
|
21
|
+
const X = ["tabindex", "aria-disabled", "onKeydown"], Y = ["src", "crossorigin"], _ = ["onClick"], ee = ["title"], te = ["onClick"], se = ["onClick"], Te = /* @__PURE__ */ D({
|
|
22
|
+
name: "ElUploadList",
|
|
23
|
+
__name: "upload-list",
|
|
24
|
+
props: {
|
|
25
|
+
files: { default: () => A([]) },
|
|
26
|
+
disabled: { type: Boolean, default: void 0 },
|
|
27
|
+
handlePreview: { type: Function, default: q },
|
|
28
|
+
listType: { default: "text" },
|
|
29
|
+
crossorigin: {}
|
|
30
|
+
},
|
|
31
|
+
emits: Q,
|
|
32
|
+
setup(l, { emit: E }) {
|
|
33
|
+
const K = l, N = E, { t: h } = H(), i = C("upload"), a = C("icon"), B = C("list"), m = W(), k = F(!1), L = z(() => [
|
|
34
|
+
i.b("list"),
|
|
35
|
+
i.bm("list", K.listType),
|
|
36
|
+
i.is("disabled", m.value)
|
|
37
|
+
]), v = (f) => {
|
|
38
|
+
N("remove", f);
|
|
39
|
+
};
|
|
40
|
+
return (f, p) => (o(), b(I, {
|
|
41
|
+
tag: "ul",
|
|
42
|
+
class: s(L.value),
|
|
43
|
+
name: e(B).b()
|
|
44
|
+
}, {
|
|
45
|
+
default: u(() => [
|
|
46
|
+
(o(!0), d(S, null, V(l.files, (t, P) => (o(), d("li", {
|
|
47
|
+
key: t.uid || t.name,
|
|
48
|
+
class: s([
|
|
49
|
+
e(i).be("list", "item"),
|
|
50
|
+
e(i).is(t.status),
|
|
51
|
+
{ focusing: k.value }
|
|
52
|
+
]),
|
|
53
|
+
tabindex: e(m) ? void 0 : 0,
|
|
54
|
+
"aria-disabled": e(m),
|
|
55
|
+
role: "button",
|
|
56
|
+
onKeydown: w((r) => !e(m) && v(t), ["delete"]),
|
|
57
|
+
onFocus: p[0] || (p[0] = (r) => k.value = !0),
|
|
58
|
+
onBlur: p[1] || (p[1] = (r) => k.value = !1),
|
|
59
|
+
onClick: p[2] || (p[2] = (r) => k.value = !1)
|
|
60
|
+
}, [
|
|
61
|
+
T(f.$slots, "default", {
|
|
62
|
+
file: t,
|
|
63
|
+
index: P
|
|
64
|
+
}, () => [
|
|
65
|
+
l.listType === "picture" || t.status !== "uploading" && l.listType === "picture-card" ? (o(), d("img", {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: s(e(i).be("list", "item-thumbnail")),
|
|
68
|
+
src: t.url,
|
|
69
|
+
crossorigin: l.crossorigin,
|
|
70
|
+
alt: ""
|
|
71
|
+
}, null, 10, Y)) : c("", !0),
|
|
72
|
+
t.status === "uploading" || l.listType !== "picture-card" ? (o(), d("div", {
|
|
73
|
+
key: 1,
|
|
74
|
+
class: s(e(i).be("list", "item-info"))
|
|
75
|
+
}, [
|
|
76
|
+
g("a", {
|
|
77
|
+
class: s(e(i).be("list", "item-name")),
|
|
78
|
+
onClick: $((r) => l.handlePreview(t), ["prevent"])
|
|
79
|
+
}, [
|
|
80
|
+
n(e(y), {
|
|
81
|
+
class: s(e(a).m("document"))
|
|
82
|
+
}, {
|
|
83
|
+
default: u(() => [
|
|
84
|
+
n(e(U))
|
|
85
|
+
]),
|
|
86
|
+
_: 1
|
|
87
|
+
}, 8, ["class"]),
|
|
88
|
+
g("span", {
|
|
89
|
+
class: s(e(i).be("list", "item-file-name")),
|
|
90
|
+
title: t.name
|
|
91
|
+
}, x(t.name), 11, ee)
|
|
92
|
+
], 10, _),
|
|
93
|
+
t.status === "uploading" ? (o(), b(e(J), {
|
|
94
|
+
key: 0,
|
|
95
|
+
type: l.listType === "picture-card" ? "circle" : "line",
|
|
96
|
+
"stroke-width": l.listType === "picture-card" ? 6 : 2,
|
|
97
|
+
percentage: Number(t.percentage),
|
|
98
|
+
style: O(l.listType === "picture-card" ? "" : "margin-top: 0.5rem")
|
|
99
|
+
}, null, 8, ["type", "stroke-width", "percentage", "style"])) : c("", !0)
|
|
100
|
+
], 2)) : c("", !0),
|
|
101
|
+
g("label", {
|
|
102
|
+
class: s(e(i).be("list", "item-status-label"))
|
|
103
|
+
}, [
|
|
104
|
+
l.listType === "text" ? (o(), b(e(y), {
|
|
105
|
+
key: 0,
|
|
106
|
+
class: s([e(a).m("upload-success"), e(a).m("circle-check")])
|
|
107
|
+
}, {
|
|
108
|
+
default: u(() => [
|
|
109
|
+
n(e(G))
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
112
|
+
}, 8, ["class"])) : ["picture-card", "picture"].includes(l.listType) ? (o(), b(e(y), {
|
|
113
|
+
key: 1,
|
|
114
|
+
class: s([e(a).m("upload-success"), e(a).m("check")])
|
|
115
|
+
}, {
|
|
116
|
+
default: u(() => [
|
|
117
|
+
n(e(M))
|
|
118
|
+
]),
|
|
119
|
+
_: 1
|
|
120
|
+
}, 8, ["class"])) : c("", !0)
|
|
121
|
+
], 2),
|
|
122
|
+
e(m) ? c("", !0) : (o(), b(e(y), {
|
|
123
|
+
key: 2,
|
|
124
|
+
class: s(e(a).m("close")),
|
|
125
|
+
"aria-label": e(h)("el.upload.delete"),
|
|
126
|
+
role: "button",
|
|
127
|
+
tabindex: "0",
|
|
128
|
+
onClick: (r) => v(t),
|
|
129
|
+
onKeydown: w($((r) => v(t), ["prevent"]), ["enter", "space"])
|
|
130
|
+
}, {
|
|
131
|
+
default: u(() => [
|
|
132
|
+
n(e(R))
|
|
133
|
+
]),
|
|
134
|
+
_: 1
|
|
135
|
+
}, 8, ["class", "aria-label", "onClick", "onKeydown"])),
|
|
136
|
+
e(m) ? c("", !0) : (o(), d("i", {
|
|
137
|
+
key: 3,
|
|
138
|
+
class: s(e(a).m("close-tip"))
|
|
139
|
+
}, x(e(h)("el.upload.deleteTip")), 3)),
|
|
140
|
+
l.listType === "picture-card" ? (o(), d("span", {
|
|
141
|
+
key: 4,
|
|
142
|
+
class: s(e(i).be("list", "item-actions"))
|
|
143
|
+
}, [
|
|
144
|
+
g("span", {
|
|
145
|
+
class: s(e(i).be("list", "item-preview")),
|
|
146
|
+
onClick: (r) => l.handlePreview(t)
|
|
147
|
+
}, [
|
|
148
|
+
n(e(y), {
|
|
149
|
+
class: s(e(a).m("zoom-in"))
|
|
150
|
+
}, {
|
|
151
|
+
default: u(() => [
|
|
152
|
+
n(e(Z))
|
|
153
|
+
]),
|
|
154
|
+
_: 1
|
|
155
|
+
}, 8, ["class"])
|
|
156
|
+
], 10, te),
|
|
157
|
+
e(m) ? c("", !0) : (o(), d("span", {
|
|
158
|
+
key: 0,
|
|
159
|
+
class: s(e(i).be("list", "item-delete")),
|
|
160
|
+
onClick: (r) => v(t)
|
|
161
|
+
}, [
|
|
162
|
+
n(e(y), {
|
|
163
|
+
class: s(e(a).m("delete"))
|
|
164
|
+
}, {
|
|
165
|
+
default: u(() => [
|
|
166
|
+
n(e(j))
|
|
167
|
+
]),
|
|
168
|
+
_: 1
|
|
169
|
+
}, 8, ["class"])
|
|
170
|
+
], 10, se))
|
|
171
|
+
], 2)) : c("", !0)
|
|
172
|
+
])
|
|
173
|
+
], 42, X))), 128)),
|
|
174
|
+
T(f.$slots, "append")
|
|
175
|
+
]),
|
|
176
|
+
_: 3
|
|
177
|
+
}, 8, ["class", "name"]));
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
export {
|
|
181
|
+
Te as default
|
|
182
|
+
};
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import type { Awaitable, Mutable } from '@element-plus/utils';
|
|
2
|
+
import type { UploadAjaxError } from './ajax';
|
|
3
|
+
import type { ExtractPublicPropTypes } from 'vue';
|
|
4
|
+
import type Upload from './upload.vue';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Removed after 3.0.0, Use `UploadProps` instead.
|
|
7
|
+
*/
|
|
8
|
+
export declare const uploadListTypes: readonly ["text", "picture", "picture-card"];
|
|
9
|
+
export declare const genFileId: () => number;
|
|
10
|
+
export type UploadStatus = 'ready' | 'uploading' | 'success' | 'fail';
|
|
11
|
+
export interface UploadProgressEvent extends ProgressEvent {
|
|
12
|
+
percent: number;
|
|
13
|
+
}
|
|
14
|
+
export interface UploadRequestOptions {
|
|
15
|
+
action: string;
|
|
16
|
+
method: string;
|
|
17
|
+
data: Record<string, string | Blob | [string | Blob, string] | string[]>;
|
|
18
|
+
filename: string;
|
|
19
|
+
file: UploadRawFile;
|
|
20
|
+
headers: Headers | Record<string, string | number | null | undefined>;
|
|
21
|
+
onError: (evt: UploadAjaxError) => void;
|
|
22
|
+
onProgress: (evt: UploadProgressEvent) => void;
|
|
23
|
+
onSuccess: (response: any) => void;
|
|
24
|
+
withCredentials: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface UploadFile {
|
|
27
|
+
name: string;
|
|
28
|
+
percentage?: number;
|
|
29
|
+
status: UploadStatus;
|
|
30
|
+
size?: number;
|
|
31
|
+
response?: unknown;
|
|
32
|
+
uid: number;
|
|
33
|
+
url?: string;
|
|
34
|
+
raw?: UploadRawFile;
|
|
35
|
+
}
|
|
36
|
+
export type UploadUserFile = Omit<UploadFile, 'status' | 'uid'> & Partial<Pick<UploadFile, 'status' | 'uid'>>;
|
|
37
|
+
export type UploadFiles = UploadFile[];
|
|
38
|
+
export interface UploadRawFile extends File {
|
|
39
|
+
uid: number;
|
|
40
|
+
isDirectory?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export type UploadRequestHandler = (options: UploadRequestOptions) => XMLHttpRequest | Promise<unknown>;
|
|
43
|
+
export interface UploadHooks {
|
|
44
|
+
beforeUpload: (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
45
|
+
beforeRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>;
|
|
46
|
+
onRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
47
|
+
onChange: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
48
|
+
onPreview: (uploadFile: UploadFile) => void;
|
|
49
|
+
onSuccess: (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
50
|
+
onProgress: (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
51
|
+
onError: (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
52
|
+
onExceed: (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
53
|
+
}
|
|
54
|
+
export type UploadData = Mutable<Record<string, any>>;
|
|
55
|
+
export type ListType = 'text' | 'picture' | 'picture-card';
|
|
56
|
+
export type Crossorigin = 'anonymous' | 'use-credentials' | '';
|
|
57
|
+
export interface UploadBaseProps {
|
|
58
|
+
/**
|
|
59
|
+
* @description request URL
|
|
60
|
+
*/
|
|
61
|
+
action?: string;
|
|
62
|
+
/**
|
|
63
|
+
* @description request headers
|
|
64
|
+
*/
|
|
65
|
+
headers?: Headers | Record<string, any>;
|
|
66
|
+
/**
|
|
67
|
+
* @description set upload request method
|
|
68
|
+
*/
|
|
69
|
+
method?: string;
|
|
70
|
+
/**
|
|
71
|
+
* @description additions options of request
|
|
72
|
+
*/
|
|
73
|
+
data?: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
|
|
74
|
+
/**
|
|
75
|
+
* @description whether uploading multiple files is permitted
|
|
76
|
+
*/
|
|
77
|
+
multiple?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* @description key name for uploaded file
|
|
80
|
+
*/
|
|
81
|
+
name?: string;
|
|
82
|
+
/**
|
|
83
|
+
* @description whether to activate drag and drop mode
|
|
84
|
+
*/
|
|
85
|
+
drag?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* @description whether cookies are sent
|
|
88
|
+
*/
|
|
89
|
+
withCredentials?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* @description whether to show the uploaded file list
|
|
92
|
+
*/
|
|
93
|
+
showFileList?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* @description accepted [file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept), will not work when `thumbnail-mode === true`
|
|
96
|
+
*/
|
|
97
|
+
accept?: string;
|
|
98
|
+
/**
|
|
99
|
+
* @description default uploaded files
|
|
100
|
+
*/
|
|
101
|
+
fileList?: UploadUserFile[];
|
|
102
|
+
/**
|
|
103
|
+
* @description whether to auto upload file
|
|
104
|
+
*/
|
|
105
|
+
autoUpload?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* @description type of file list
|
|
108
|
+
*/
|
|
109
|
+
listType?: ListType;
|
|
110
|
+
/**
|
|
111
|
+
* @description override default xhr behavior, allowing you to implement your own upload-file's request
|
|
112
|
+
*/
|
|
113
|
+
httpRequest?: UploadRequestHandler;
|
|
114
|
+
/**
|
|
115
|
+
* @description whether to disable upload
|
|
116
|
+
*/
|
|
117
|
+
disabled?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* @description maximum number of uploads allowed
|
|
120
|
+
*/
|
|
121
|
+
limit?: number;
|
|
122
|
+
/**
|
|
123
|
+
* @description whether to support uploading directory
|
|
124
|
+
*/
|
|
125
|
+
directory?: boolean;
|
|
126
|
+
}
|
|
127
|
+
export interface UploadProps extends UploadBaseProps {
|
|
128
|
+
/**
|
|
129
|
+
* @description hook function before uploading with the file to be uploaded as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, uploading will be aborted
|
|
130
|
+
*/
|
|
131
|
+
beforeUpload?: UploadHooks['beforeUpload'];
|
|
132
|
+
/**
|
|
133
|
+
* @description hook function before removing a file with the file and file list as its parameters. If `false` is returned or a `Promise` is returned and then is rejected, removing will be aborted
|
|
134
|
+
*/
|
|
135
|
+
beforeRemove?: UploadHooks['beforeRemove'];
|
|
136
|
+
/**
|
|
137
|
+
* @description hook function when files are removed
|
|
138
|
+
*/
|
|
139
|
+
onRemove?: UploadHooks['onRemove'];
|
|
140
|
+
/**
|
|
141
|
+
* @description hook function when select file or upload file success or upload file fail
|
|
142
|
+
*/
|
|
143
|
+
onChange?: UploadHooks['onChange'];
|
|
144
|
+
/**
|
|
145
|
+
* @description hook function when clicking the uploaded files
|
|
146
|
+
*/
|
|
147
|
+
onPreview?: UploadHooks['onPreview'];
|
|
148
|
+
/**
|
|
149
|
+
* @description hook function when uploaded successfully
|
|
150
|
+
*/
|
|
151
|
+
onSuccess?: UploadHooks['onSuccess'];
|
|
152
|
+
/**
|
|
153
|
+
* @description hook function when some progress occurs
|
|
154
|
+
*/
|
|
155
|
+
onProgress?: UploadHooks['onProgress'];
|
|
156
|
+
/**
|
|
157
|
+
* @description hook function when some errors occurs
|
|
158
|
+
*/
|
|
159
|
+
onError?: UploadHooks['onError'];
|
|
160
|
+
/**
|
|
161
|
+
* @description hook function when limit is exceeded
|
|
162
|
+
*/
|
|
163
|
+
onExceed?: UploadHooks['onExceed'];
|
|
164
|
+
/**
|
|
165
|
+
* @description set HTML attribute: crossorigin.
|
|
166
|
+
*/
|
|
167
|
+
crossorigin?: Crossorigin;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* @deprecated Removed after 3.0.0, Use `UploadBaseProps` instead.
|
|
171
|
+
*/
|
|
172
|
+
export declare const uploadBaseProps: {
|
|
173
|
+
readonly action: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "#", boolean>;
|
|
174
|
+
readonly headers: {
|
|
175
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers) | (((new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers)) | null)[], unknown, unknown>>;
|
|
176
|
+
readonly required: false;
|
|
177
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
178
|
+
__epPropKey: true;
|
|
179
|
+
};
|
|
180
|
+
readonly method: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "post", boolean>;
|
|
181
|
+
readonly data: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => Mutable<Record<string, any>> | Promise<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (() => Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (((new (...args: any[]) => Mutable<Record<string, any>> | Promise<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (() => Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>))) | null)[], unknown, unknown, () => Mutable<{}>, boolean>;
|
|
182
|
+
readonly multiple: BooleanConstructor;
|
|
183
|
+
readonly name: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "file", boolean>;
|
|
184
|
+
readonly drag: BooleanConstructor;
|
|
185
|
+
readonly withCredentials: BooleanConstructor;
|
|
186
|
+
readonly showFileList: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
187
|
+
readonly accept: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
188
|
+
readonly fileList: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => UploadUserFile[]) | (() => UploadUserFile[]) | (((new (...args: any[]) => UploadUserFile[]) | (() => UploadUserFile[])) | null)[], unknown, unknown, () => [], boolean>;
|
|
189
|
+
readonly autoUpload: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
190
|
+
readonly listType: import("@element-plus/utils").EpPropFinalized<StringConstructor, "text" | "picture" | "picture-card", unknown, "text", boolean>;
|
|
191
|
+
readonly httpRequest: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => UploadRequestHandler) | (() => UploadRequestHandler) | {
|
|
192
|
+
(): UploadRequestHandler;
|
|
193
|
+
new (): any;
|
|
194
|
+
readonly prototype: any;
|
|
195
|
+
} | (((new (...args: any[]) => UploadRequestHandler) | (() => UploadRequestHandler) | {
|
|
196
|
+
(): UploadRequestHandler;
|
|
197
|
+
new (): any;
|
|
198
|
+
readonly prototype: any;
|
|
199
|
+
}) | null)[], unknown, unknown, UploadRequestHandler, boolean>;
|
|
200
|
+
readonly disabled: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
201
|
+
readonly limit: NumberConstructor;
|
|
202
|
+
readonly directory: BooleanConstructor;
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* @deprecated Removed after 3.0.0, Use `UploadProps` instead.
|
|
206
|
+
*/
|
|
207
|
+
export declare const uploadProps: {
|
|
208
|
+
readonly beforeUpload: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
209
|
+
(): (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
210
|
+
new (): any;
|
|
211
|
+
readonly prototype: any;
|
|
212
|
+
} | (((new (...args: any[]) => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | (() => (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>) | {
|
|
213
|
+
(): (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
214
|
+
new (): any;
|
|
215
|
+
readonly prototype: any;
|
|
216
|
+
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
217
|
+
readonly beforeRemove: {
|
|
218
|
+
readonly type: import("vue").PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>>;
|
|
219
|
+
readonly required: false;
|
|
220
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
221
|
+
__epPropKey: true;
|
|
222
|
+
};
|
|
223
|
+
readonly onRemove: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
224
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
225
|
+
new (): any;
|
|
226
|
+
readonly prototype: any;
|
|
227
|
+
} | (((new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
228
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
229
|
+
new (): any;
|
|
230
|
+
readonly prototype: any;
|
|
231
|
+
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
232
|
+
readonly onChange: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
233
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
234
|
+
new (): any;
|
|
235
|
+
readonly prototype: any;
|
|
236
|
+
} | (((new (...args: any[]) => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
237
|
+
(): (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
238
|
+
new (): any;
|
|
239
|
+
readonly prototype: any;
|
|
240
|
+
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
241
|
+
readonly onPreview: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => (uploadFile: UploadFile) => void) | (() => (uploadFile: UploadFile) => void) | {
|
|
242
|
+
(): (uploadFile: UploadFile) => void;
|
|
243
|
+
new (): any;
|
|
244
|
+
readonly prototype: any;
|
|
245
|
+
} | (((new (...args: any[]) => (uploadFile: UploadFile) => void) | (() => (uploadFile: UploadFile) => void) | {
|
|
246
|
+
(): (uploadFile: UploadFile) => void;
|
|
247
|
+
new (): any;
|
|
248
|
+
readonly prototype: any;
|
|
249
|
+
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
250
|
+
readonly onSuccess: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
251
|
+
(): (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
252
|
+
new (): any;
|
|
253
|
+
readonly prototype: any;
|
|
254
|
+
} | (((new (...args: any[]) => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
255
|
+
(): (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
256
|
+
new (): any;
|
|
257
|
+
readonly prototype: any;
|
|
258
|
+
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
259
|
+
readonly onProgress: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
260
|
+
(): (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
261
|
+
new (): any;
|
|
262
|
+
readonly prototype: any;
|
|
263
|
+
} | (((new (...args: any[]) => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
264
|
+
(): (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
265
|
+
new (): any;
|
|
266
|
+
readonly prototype: any;
|
|
267
|
+
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
268
|
+
readonly onError: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
269
|
+
(): (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
270
|
+
new (): any;
|
|
271
|
+
readonly prototype: any;
|
|
272
|
+
} | (((new (...args: any[]) => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | (() => (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void) | {
|
|
273
|
+
(): (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
274
|
+
new (): any;
|
|
275
|
+
readonly prototype: any;
|
|
276
|
+
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
277
|
+
readonly onExceed: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => (files: File[], uploadFiles: UploadUserFile[]) => void) | (() => (files: File[], uploadFiles: UploadUserFile[]) => void) | {
|
|
278
|
+
(): (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
279
|
+
new (): any;
|
|
280
|
+
readonly prototype: any;
|
|
281
|
+
} | (((new (...args: any[]) => (files: File[], uploadFiles: UploadUserFile[]) => void) | (() => (files: File[], uploadFiles: UploadUserFile[]) => void) | {
|
|
282
|
+
(): (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
283
|
+
new (): any;
|
|
284
|
+
readonly prototype: any;
|
|
285
|
+
}) | null)[], unknown, unknown, () => void, boolean>;
|
|
286
|
+
readonly crossorigin: {
|
|
287
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials") | (((new (...args: any[]) => "" | "anonymous" | "use-credentials") | (() => "" | "anonymous" | "use-credentials")) | null)[], unknown, unknown>>;
|
|
288
|
+
readonly required: false;
|
|
289
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
290
|
+
__epPropKey: true;
|
|
291
|
+
};
|
|
292
|
+
readonly action: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "#", boolean>;
|
|
293
|
+
readonly headers: {
|
|
294
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers) | (((new (...args: any[]) => Record<string, any> | Headers) | (() => Record<string, any> | Headers)) | null)[], unknown, unknown>>;
|
|
295
|
+
readonly required: false;
|
|
296
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
297
|
+
__epPropKey: true;
|
|
298
|
+
};
|
|
299
|
+
readonly method: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "post", boolean>;
|
|
300
|
+
readonly data: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => Mutable<Record<string, any>> | Promise<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (() => Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (((new (...args: any[]) => Mutable<Record<string, any>> | Promise<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | (() => Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>))) | null)[], unknown, unknown, () => Mutable<{}>, boolean>;
|
|
301
|
+
readonly multiple: BooleanConstructor;
|
|
302
|
+
readonly name: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "file", boolean>;
|
|
303
|
+
readonly drag: BooleanConstructor;
|
|
304
|
+
readonly withCredentials: BooleanConstructor;
|
|
305
|
+
readonly showFileList: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
306
|
+
readonly accept: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
307
|
+
readonly fileList: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => UploadUserFile[]) | (() => UploadUserFile[]) | (((new (...args: any[]) => UploadUserFile[]) | (() => UploadUserFile[])) | null)[], unknown, unknown, () => [], boolean>;
|
|
308
|
+
readonly autoUpload: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
309
|
+
readonly listType: import("@element-plus/utils").EpPropFinalized<StringConstructor, "text" | "picture" | "picture-card", unknown, "text", boolean>;
|
|
310
|
+
readonly httpRequest: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => UploadRequestHandler) | (() => UploadRequestHandler) | {
|
|
311
|
+
(): UploadRequestHandler;
|
|
312
|
+
new (): any;
|
|
313
|
+
readonly prototype: any;
|
|
314
|
+
} | (((new (...args: any[]) => UploadRequestHandler) | (() => UploadRequestHandler) | {
|
|
315
|
+
(): UploadRequestHandler;
|
|
316
|
+
new (): any;
|
|
317
|
+
readonly prototype: any;
|
|
318
|
+
}) | null)[], unknown, unknown, UploadRequestHandler, boolean>;
|
|
319
|
+
readonly disabled: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
320
|
+
readonly limit: NumberConstructor;
|
|
321
|
+
readonly directory: BooleanConstructor;
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* @deprecated Removed after 3.0.0, Use `UploadProps` instead.
|
|
325
|
+
*/
|
|
326
|
+
export type UploadPropsPublic = ExtractPublicPropTypes<typeof uploadProps>;
|
|
327
|
+
export type UploadInstance = InstanceType<typeof Upload> & unknown;
|
|
328
|
+
export declare const uploadBasePropsDefaults: {
|
|
329
|
+
readonly action: "#";
|
|
330
|
+
readonly method: "post";
|
|
331
|
+
readonly data: () => Mutable<{}>;
|
|
332
|
+
readonly name: "file";
|
|
333
|
+
readonly showFileList: true;
|
|
334
|
+
readonly accept: "";
|
|
335
|
+
readonly fileList: () => never[];
|
|
336
|
+
readonly autoUpload: true;
|
|
337
|
+
readonly listType: "text";
|
|
338
|
+
readonly httpRequest: UploadRequestHandler;
|
|
339
|
+
readonly disabled: undefined;
|
|
340
|
+
};
|
|
341
|
+
export declare const uploadPropsDefaults: {
|
|
342
|
+
readonly beforeUpload: () => void;
|
|
343
|
+
readonly onRemove: () => void;
|
|
344
|
+
readonly onChange: () => void;
|
|
345
|
+
readonly onPreview: () => void;
|
|
346
|
+
readonly onSuccess: () => void;
|
|
347
|
+
readonly onProgress: () => void;
|
|
348
|
+
readonly onError: () => void;
|
|
349
|
+
readonly onExceed: () => void;
|
|
350
|
+
readonly action: "#";
|
|
351
|
+
readonly method: "post";
|
|
352
|
+
readonly data: () => Mutable<{}>;
|
|
353
|
+
readonly name: "file";
|
|
354
|
+
readonly showFileList: true;
|
|
355
|
+
readonly accept: "";
|
|
356
|
+
readonly fileList: () => never[];
|
|
357
|
+
readonly autoUpload: true;
|
|
358
|
+
readonly listType: "text";
|
|
359
|
+
readonly httpRequest: UploadRequestHandler;
|
|
360
|
+
readonly disabled: undefined;
|
|
361
|
+
};
|