vft 0.0.334 → 0.0.337
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/index.css +1 -1
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/search/style/css.d.ts +1 -0
- package/es/components/search/style/css.js +1 -0
- package/es/components/search/style/index.d.ts +1 -0
- package/es/components/search/style/index.js +1 -0
- package/es/components/super-form/index.d.ts +15 -0
- package/es/components/super-form/super-form-item.vue2.js +1 -1
- package/es/components/super-form/super-form.vue.d.ts +1 -0
- package/es/components/super-form/super-form.vue2.js +3 -3
- package/es/components/super-form/types.d.ts +1 -0
- package/es/components/super-form/use/helper.js +53 -137
- package/es/components/upload/index.d.ts +72 -18
- package/es/components/upload/types.d.ts +17 -2
- package/es/components/upload/upload-content.vue.d.ts +10 -1
- package/es/components/upload/upload-content.vue2.js +103 -80
- package/es/components/upload/upload.vue.d.ts +22 -13
- package/es/components/upload/upload.vue2.js +201 -73
- package/es/components/upload/use-handlers.js +69 -61
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/search/style/css.cjs +1 -1
- package/lib/components/search/style/css.d.ts +1 -0
- package/lib/components/search/style/index.cjs +1 -1
- package/lib/components/search/style/index.d.ts +1 -0
- package/lib/components/super-form/index.d.ts +15 -0
- package/lib/components/super-form/super-form.vue.d.ts +1 -0
- package/lib/components/super-form/super-form.vue2.cjs +1 -1
- package/lib/components/super-form/types.d.ts +1 -0
- package/lib/components/super-form/use/helper.cjs +1 -1
- package/lib/components/upload/index.d.ts +72 -18
- package/lib/components/upload/types.d.ts +17 -2
- package/lib/components/upload/upload-content.vue.d.ts +10 -1
- package/lib/components/upload/upload-content.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue.d.ts +22 -13
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/components/upload/use-handlers.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +5 -5
- package/theme-style/index.css +1 -1
- package/theme-style/src/checkbox.scss +46 -45
- package/theme-style/vft-checkbox.css +1 -1
- package/web-types.json +1 -1
|
@@ -10,7 +10,7 @@ import "../../hooks/use-model-toggle/index.js";
|
|
|
10
10
|
import { useOrderedChildren as Ie } from "../../hooks/use-ordered-children/index.js";
|
|
11
11
|
import "@popperjs/core";
|
|
12
12
|
import "../../hooks/use-z-index/index.js";
|
|
13
|
-
import {
|
|
13
|
+
import { carouselContextKey as ge, CAROUSEL_ITEM_NAME as H } from "./constants.js";
|
|
14
14
|
const L = 300, _e = (t, O, M) => {
|
|
15
15
|
const {
|
|
16
16
|
children: o,
|
|
@@ -13,8 +13,8 @@ import "../../hooks/use-z-index/index.js";
|
|
|
13
13
|
import { UPDATE_MODEL_EVENT as Q } from "@vft/constants";
|
|
14
14
|
import { useAttrs as Ze, useCursor as _e } from "@vft/use";
|
|
15
15
|
import { calcTextareaHeight as ye } from "./utils.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { useFormItem as et, useFormItemInputId as tt } from "../form/hooks/use-form-item.js";
|
|
17
|
+
import { useFormSize as at, useFormDisabled as ot } from "../form/hooks/use-form-common-props.js";
|
|
18
18
|
const nt = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form"], st = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form"], It = /* @__PURE__ */ Oe({
|
|
19
19
|
__name: "input",
|
|
20
20
|
props: {
|
|
@@ -85,9 +85,9 @@ const nt = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
|
|
|
85
85
|
o.is("focus", v.value)
|
|
86
86
|
]), d = Ze({
|
|
87
87
|
excludeKeys: l(() => Object.keys(X.value))
|
|
88
|
-
}), { form: Ce, formItem: F } =
|
|
88
|
+
}), { form: Ce, formItem: F } = et(), { inputId: Y } = tt(xe.props, {
|
|
89
89
|
formItemContext: F
|
|
90
|
-
}), ke =
|
|
90
|
+
}), ke = at(), h = ot(), o = pe("input"), Z = pe("textarea"), M = H(), b = H(), v = S(!1), N = S(!1), C = S(!1), K = S(!1), _ = S(), O = H(e.inputStyle), k = l(() => M.value || b.value), T = l(() => G(e.prefixIcon, "icon", { size: 16 })), ee = l(() => G(e.suffixIcon, "icon", { size: 16 })), Ie = l(() => G(e.clearIcon, "icon", {
|
|
91
91
|
icon: "icon-circle-close",
|
|
92
92
|
size: 16
|
|
93
93
|
})), te = l(() => Ce?.statusIcon ?? !1), I = l(() => F?.validateState || ""), ae = l(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowRef as B, ref as L, computed as c, watch as G } from "vue";
|
|
2
2
|
import { EVENT_CODE as g } from "../../../constants/aria.js";
|
|
3
|
-
import { CHANGE_EVENT as i,
|
|
3
|
+
import { CHANGE_EVENT as i, UPDATE_MODEL_EVENT as d, INPUT_EVENT as H } from "../../../constants/event.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import { isUndefined as K } from "@vft/utils";
|
|
6
6
|
import { debugWarn as C } from "../../../utils/error.js";
|
|
@@ -4,6 +4,10 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
4
4
|
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
5
5
|
default: string;
|
|
6
6
|
};
|
|
7
|
+
labelPosition: {
|
|
8
|
+
type: import("vue").PropType<"top" | "left" | "right">;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
7
11
|
showResetButton: {
|
|
8
12
|
type: import("vue").PropType<boolean>;
|
|
9
13
|
default: boolean;
|
|
@@ -141,6 +145,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
141
145
|
"field-value-change": () => void;
|
|
142
146
|
}, import("vue").PublicProps, {
|
|
143
147
|
size: import("vft/es/constants").ComponentSize;
|
|
148
|
+
labelPosition: "left" | "right" | "top";
|
|
144
149
|
showResetButton: boolean;
|
|
145
150
|
showSubmitButton: boolean;
|
|
146
151
|
showCommonButton: boolean;
|
|
@@ -166,6 +171,10 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
166
171
|
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
167
172
|
default: string;
|
|
168
173
|
};
|
|
174
|
+
labelPosition: {
|
|
175
|
+
type: import("vue").PropType<"top" | "left" | "right">;
|
|
176
|
+
default: string;
|
|
177
|
+
};
|
|
169
178
|
showResetButton: {
|
|
170
179
|
type: import("vue").PropType<boolean>;
|
|
171
180
|
default: boolean;
|
|
@@ -298,6 +307,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
298
307
|
formModel: import("vue").ComputedRef<import("../types").Recordable>;
|
|
299
308
|
}, {}, {}, {}, {
|
|
300
309
|
size: import("vft/es/constants").ComponentSize;
|
|
310
|
+
labelPosition: "left" | "right" | "top";
|
|
301
311
|
showResetButton: boolean;
|
|
302
312
|
showSubmitButton: boolean;
|
|
303
313
|
showCommonButton: boolean;
|
|
@@ -320,6 +330,10 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
320
330
|
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
321
331
|
default: string;
|
|
322
332
|
};
|
|
333
|
+
labelPosition: {
|
|
334
|
+
type: import("vue").PropType<"top" | "left" | "right">;
|
|
335
|
+
default: string;
|
|
336
|
+
};
|
|
323
337
|
showResetButton: {
|
|
324
338
|
type: import("vue").PropType<boolean>;
|
|
325
339
|
default: boolean;
|
|
@@ -457,6 +471,7 @@ export declare const VftSuperForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
457
471
|
"field-value-change": () => void;
|
|
458
472
|
}, string, {
|
|
459
473
|
size: import("vft/es/constants").ComponentSize;
|
|
474
|
+
labelPosition: "left" | "right" | "top";
|
|
460
475
|
showResetButton: boolean;
|
|
461
476
|
showSubmitButton: boolean;
|
|
462
477
|
showCommonButton: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as $, computed as v, ref as ee, unref as u, useSlots as te, createVNode as f, mergeProps as L, withDirectives as re, vShow as ne,
|
|
1
|
+
import { defineComponent as $, computed as v, ref as ee, unref as u, useSlots as te, createVNode as f, mergeProps as L, withDirectives as re, vShow as ne, createTextVNode as G, isVNode as oe, resolveComponent as q } from "vue";
|
|
2
2
|
import { VftCol as J } from "../col/index.js";
|
|
3
3
|
import { VftDivider as le } from "../divider/index.js";
|
|
4
4
|
import { VftFormItem as se } from "../form/index.js";
|
|
@@ -79,6 +79,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
79
79
|
"onField-value-change"?: (() => any) | undefined;
|
|
80
80
|
}>, {
|
|
81
81
|
size: import("vft/es/constants").ComponentSize;
|
|
82
|
+
labelPosition: "left" | "right" | "top";
|
|
82
83
|
showResetButton: boolean;
|
|
83
84
|
showSubmitButton: boolean;
|
|
84
85
|
showCommonButton: boolean;
|
|
@@ -103,14 +103,14 @@ const Ee = W({
|
|
|
103
103
|
submitResetReverse: {
|
|
104
104
|
type: Boolean
|
|
105
105
|
},
|
|
106
|
+
labelPosition: {
|
|
107
|
+
default: "right"
|
|
108
|
+
},
|
|
106
109
|
disabled: {
|
|
107
110
|
type: Boolean
|
|
108
111
|
},
|
|
109
112
|
model: {},
|
|
110
113
|
rules: {},
|
|
111
|
-
labelPosition: {
|
|
112
|
-
default: "right"
|
|
113
|
-
},
|
|
114
114
|
requireAsteriskPosition: {
|
|
115
115
|
default: "left"
|
|
116
116
|
},
|
|
@@ -1,141 +1,57 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
import "../../pagination/index.js";
|
|
51
|
-
import "../../popconfirm/index.js";
|
|
52
|
-
import "../../popover/index.js";
|
|
53
|
-
import "../../popper/index.js";
|
|
54
|
-
import "../../qrcode/index.js";
|
|
55
|
-
import "../../radio/index.js";
|
|
56
|
-
import "../../result/index.js";
|
|
57
|
-
import "../../router-view-content/index.js";
|
|
58
|
-
import "../../row/index.js";
|
|
59
|
-
import "../../scrollbar/index.js";
|
|
60
|
-
import "../../search/index.js";
|
|
61
|
-
import "../../select/index.js";
|
|
62
|
-
import "../../side-menu/index.js";
|
|
63
|
-
import "../../skeleton/index.js";
|
|
64
|
-
import "../../slider/index.js";
|
|
65
|
-
import "../../space/index.js";
|
|
66
|
-
import "../../steps/index.js";
|
|
67
|
-
import "../../switch/index.js";
|
|
68
|
-
import "../../table/index.js";
|
|
69
|
-
import "../../tabs/index.js";
|
|
70
|
-
import "../../tag/index.js";
|
|
71
|
-
import "../../time-picker/index.js";
|
|
72
|
-
import "../../tooltip/index.js";
|
|
73
|
-
import "../../tree/index.js";
|
|
74
|
-
import "../../verify-code/index.js";
|
|
75
|
-
import "../../virtual-list/components/fixed-size-list.js";
|
|
76
|
-
import "../../virtual-list/components/dynamic-size-list.js";
|
|
77
|
-
import "../../virtual-list/components/fixed-size-grid.js";
|
|
78
|
-
import "../../virtual-list/components/dynamic-size-grid.js";
|
|
79
|
-
import "../../virtual-list/props.js";
|
|
80
|
-
import "../../autocomplete/index.js";
|
|
81
|
-
import "../../breadcrumb/index.js";
|
|
82
|
-
import "../../carousel/index.js";
|
|
83
|
-
import "../../collapse/index.js";
|
|
84
|
-
import "../../countdown/index.js";
|
|
85
|
-
import "../../input-tag/index.js";
|
|
86
|
-
import "../../modal/index.js";
|
|
87
|
-
import "../../progress/index.js";
|
|
88
|
-
import "../../segmented/index.js";
|
|
89
|
-
import "../../statistic/index.js";
|
|
90
|
-
import "../index.js";
|
|
91
|
-
import "../../timeline/index.js";
|
|
92
|
-
import "../../transfer/index.js";
|
|
93
|
-
import "../../upload/index.js";
|
|
94
|
-
import "../../watermark/index.js";
|
|
95
|
-
import "../../md-code-demo/index.js";
|
|
96
|
-
import "../../md-code-tabs/index.js";
|
|
97
|
-
import "../../md-comment/index.js";
|
|
98
|
-
import "../../md-container/index.js";
|
|
99
|
-
import "../../md-tabs/index.js";
|
|
100
|
-
import "../../md-vue-playground/index.js";
|
|
101
|
-
import "../../infinite-scroll/index.js";
|
|
102
|
-
import "@vueuse/core";
|
|
103
|
-
import "../../config-provider/hooks/use-global-config.js";
|
|
104
|
-
import "lodash-es";
|
|
105
|
-
import "../../../hooks/use-model-toggle/index.js";
|
|
106
|
-
import "@popperjs/core";
|
|
107
|
-
import "../../../hooks/use-z-index/index.js";
|
|
108
|
-
import "../../message/index.js";
|
|
109
|
-
import "../../progress-i/index.js";
|
|
110
|
-
import { FormCompEnum as r, isInput as m } from "../component-map.js";
|
|
111
|
-
function Ei(i, o = "") {
|
|
112
|
-
return o = (o || "").replace(":", ""), [
|
|
113
|
-
r.INPUT,
|
|
114
|
-
r.INPUT_NUMBER,
|
|
115
|
-
r.TEXTAREA,
|
|
116
|
-
r.AUTOCOMPLETE
|
|
117
|
-
].includes(i) ? "请输入" + o : [r.PASSWORD].includes(i) ? "请输入密码" : [
|
|
118
|
-
r.SELECT,
|
|
119
|
-
r.RADIO,
|
|
120
|
-
r.Cascader,
|
|
121
|
-
r.ColorPicker
|
|
122
|
-
].includes(i) ? "请选择" + o : [r.SEARCH].includes(i) ? "请输入要搜索的内容" : [r.INPUT_TAG].includes(i) ? "请输入标签内容" : [r.Upload].includes(i) ? "请选择上传文件" : [r.Slider].includes(i) ? "请拖动滑块" : [
|
|
123
|
-
r.TIME_PICKER,
|
|
124
|
-
r.YEAR_PICKER,
|
|
125
|
-
r.MONTH_PICKER,
|
|
126
|
-
r.DATE_PICKER,
|
|
127
|
-
r.DATES_PICKER,
|
|
128
|
-
r.DATETIME_PICKER,
|
|
129
|
-
r.WEEK_PICKER,
|
|
130
|
-
r.DATETIMERANGE_PICKER,
|
|
131
|
-
r.DATERANGE_PICKER,
|
|
132
|
-
r.MONTHRANGE_PICKER
|
|
133
|
-
].includes(i) ? "请选择时间" : "";
|
|
1
|
+
import { isNumber as n } from "@vft/utils";
|
|
2
|
+
import { isInput as u, FormCompEnum as e } from "../component-map.js";
|
|
3
|
+
function s(r, E = "") {
|
|
4
|
+
if (E = (E || "").replace(":", ""), [
|
|
5
|
+
e.INPUT,
|
|
6
|
+
e.INPUT_NUMBER,
|
|
7
|
+
e.TEXTAREA,
|
|
8
|
+
e.AUTOCOMPLETE
|
|
9
|
+
].includes(r))
|
|
10
|
+
return "请输入" + E;
|
|
11
|
+
if ([e.PASSWORD].includes(r))
|
|
12
|
+
return "请输入密码";
|
|
13
|
+
if ([
|
|
14
|
+
e.SELECT,
|
|
15
|
+
e.RADIO,
|
|
16
|
+
e.RADIO_SINGLE,
|
|
17
|
+
e.RADIO_BUTTON,
|
|
18
|
+
e.Cascader,
|
|
19
|
+
e.ColorPicker,
|
|
20
|
+
e.CHECKBOX,
|
|
21
|
+
e.CHECKBOX_BUTTON
|
|
22
|
+
].includes(r))
|
|
23
|
+
return "请选择" + E;
|
|
24
|
+
if ([e.CHECKBOX_SINGLE].includes(r))
|
|
25
|
+
return "请勾选" + E;
|
|
26
|
+
if (![e.INPUT_TAG].includes(r)) {
|
|
27
|
+
if ([e.SEARCH].includes(r))
|
|
28
|
+
return "请输入要搜索的内容";
|
|
29
|
+
if ([e.INPUT_TAG].includes(r))
|
|
30
|
+
return "请输入标签内容";
|
|
31
|
+
if ([e.Upload].includes(r))
|
|
32
|
+
return "请选择上传文件";
|
|
33
|
+
if ([e.Slider].includes(r))
|
|
34
|
+
return "请拖动滑块";
|
|
35
|
+
if ([
|
|
36
|
+
e.TIME_PICKER,
|
|
37
|
+
e.YEAR_PICKER,
|
|
38
|
+
e.MONTH_PICKER,
|
|
39
|
+
e.DATE_PICKER,
|
|
40
|
+
e.DATES_PICKER,
|
|
41
|
+
e.DATETIME_PICKER,
|
|
42
|
+
e.WEEK_PICKER,
|
|
43
|
+
e.DATETIMERANGE_PICKER,
|
|
44
|
+
e.DATERANGE_PICKER,
|
|
45
|
+
e.MONTHRANGE_PICKER
|
|
46
|
+
].includes(r))
|
|
47
|
+
return "请选择时间";
|
|
48
|
+
}
|
|
49
|
+
return "";
|
|
134
50
|
}
|
|
135
|
-
function
|
|
136
|
-
return
|
|
51
|
+
function I(r, E) {
|
|
52
|
+
return r && u(r) && E && n(E) ? `${E}` : E;
|
|
137
53
|
}
|
|
138
54
|
export {
|
|
139
|
-
|
|
140
|
-
|
|
55
|
+
s as createPlaceholderMessage,
|
|
56
|
+
I as handleInputNumberValue
|
|
141
57
|
};
|
|
@@ -14,7 +14,7 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
14
14
|
type: import("vue").PropType<(evt: import("./types").UploadProgressEvent, uploadFile: import("./types").UploadFile, uploadFiles: import("./types").UploadFiles) => void>;
|
|
15
15
|
};
|
|
16
16
|
onChange: {
|
|
17
|
-
type: import("vue").PropType<(uploadFile: import("./types").UploadFile, uploadFiles: import("./types").UploadFiles) => void>;
|
|
17
|
+
type: import("vue").PropType<(uploadFile: import("./types").UploadFile, uploadFiles: import("./types").UploadFiles, uploadInstance?: any) => void>;
|
|
18
18
|
};
|
|
19
19
|
onError: {
|
|
20
20
|
type: import("vue").PropType<(error: Error, uploadFile: import("./types").UploadFile, uploadFiles: import("./types").UploadFiles) => void>;
|
|
@@ -42,6 +42,10 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
42
42
|
type: import("vue").PropType<string>;
|
|
43
43
|
default: string;
|
|
44
44
|
};
|
|
45
|
+
fileList: {
|
|
46
|
+
type: import("vue").PropType<import("./types").UploadUserFile[]>;
|
|
47
|
+
default: never[];
|
|
48
|
+
};
|
|
45
49
|
withCredentials: {
|
|
46
50
|
type: import("vue").PropType<boolean>;
|
|
47
51
|
};
|
|
@@ -53,10 +57,6 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
53
57
|
type: import("vue").PropType<string>;
|
|
54
58
|
default: string;
|
|
55
59
|
};
|
|
56
|
-
fileList: {
|
|
57
|
-
type: import("vue").PropType<import("./types").UploadUserFile[]>;
|
|
58
|
-
default: never[];
|
|
59
|
-
};
|
|
60
60
|
autoUpload: {
|
|
61
61
|
type: import("vue").PropType<boolean>;
|
|
62
62
|
default: boolean;
|
|
@@ -72,6 +72,18 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
72
72
|
limit: {
|
|
73
73
|
type: import("vue").PropType<number>;
|
|
74
74
|
};
|
|
75
|
+
replaceOnLimit: {
|
|
76
|
+
type: import("vue").PropType<boolean>;
|
|
77
|
+
default: boolean;
|
|
78
|
+
};
|
|
79
|
+
maxSize: {
|
|
80
|
+
type: import("vue").PropType<number>;
|
|
81
|
+
default: undefined;
|
|
82
|
+
};
|
|
83
|
+
sizeExceedMessage: {
|
|
84
|
+
type: import("vue").PropType<string>;
|
|
85
|
+
default: string;
|
|
86
|
+
};
|
|
75
87
|
beforeUpload: {
|
|
76
88
|
type: import("vue").PropType<(rawFile: import("./types").UploadRawFile) => import("../types").Awaitable<void | undefined | null | boolean | File | Blob>>;
|
|
77
89
|
};
|
|
@@ -85,6 +97,9 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
85
97
|
type: import("vue").PropType<(files: File[], uploadFiles: import("./types").UploadUserFile[]) => void>;
|
|
86
98
|
default: () => void;
|
|
87
99
|
};
|
|
100
|
+
onSizeExceed: {
|
|
101
|
+
type: import("vue").PropType<(file: File, maxSize: number) => void>;
|
|
102
|
+
};
|
|
88
103
|
beforeRemove: {
|
|
89
104
|
type: import("vue").PropType<(uploadFile: import("./types").UploadFile, uploadFiles: import("./types").UploadFiles) => import("../types").Awaitable<boolean>>;
|
|
90
105
|
};
|
|
@@ -147,12 +162,15 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
147
162
|
method: string;
|
|
148
163
|
multiple: boolean;
|
|
149
164
|
action: string;
|
|
165
|
+
fileList: import("./types").UploadUserFile[];
|
|
150
166
|
showFileList: boolean;
|
|
151
167
|
accept: string;
|
|
152
|
-
fileList: import("./types").UploadUserFile[];
|
|
153
168
|
autoUpload: boolean;
|
|
154
169
|
listType: import("./types").ListType;
|
|
155
170
|
httpRequest: import("./types").UploadRequestHandler;
|
|
171
|
+
replaceOnLimit: boolean;
|
|
172
|
+
maxSize: number;
|
|
173
|
+
sizeExceedMessage: string;
|
|
156
174
|
onExceed: import("./types").UploadHooks["onExceed"];
|
|
157
175
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
158
176
|
P: {};
|
|
@@ -176,7 +194,7 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
176
194
|
type: import("vue").PropType<(evt: import("./types").UploadProgressEvent, uploadFile: import("./types").UploadFile, uploadFiles: import("./types").UploadFiles) => void>;
|
|
177
195
|
};
|
|
178
196
|
onChange: {
|
|
179
|
-
type: import("vue").PropType<(uploadFile: import("./types").UploadFile, uploadFiles: import("./types").UploadFiles) => void>;
|
|
197
|
+
type: import("vue").PropType<(uploadFile: import("./types").UploadFile, uploadFiles: import("./types").UploadFiles, uploadInstance?: any) => void>;
|
|
180
198
|
};
|
|
181
199
|
onError: {
|
|
182
200
|
type: import("vue").PropType<(error: Error, uploadFile: import("./types").UploadFile, uploadFiles: import("./types").UploadFiles) => void>;
|
|
@@ -204,6 +222,10 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
204
222
|
type: import("vue").PropType<string>;
|
|
205
223
|
default: string;
|
|
206
224
|
};
|
|
225
|
+
fileList: {
|
|
226
|
+
type: import("vue").PropType<import("./types").UploadUserFile[]>;
|
|
227
|
+
default: never[];
|
|
228
|
+
};
|
|
207
229
|
withCredentials: {
|
|
208
230
|
type: import("vue").PropType<boolean>;
|
|
209
231
|
};
|
|
@@ -215,10 +237,6 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
215
237
|
type: import("vue").PropType<string>;
|
|
216
238
|
default: string;
|
|
217
239
|
};
|
|
218
|
-
fileList: {
|
|
219
|
-
type: import("vue").PropType<import("./types").UploadUserFile[]>;
|
|
220
|
-
default: never[];
|
|
221
|
-
};
|
|
222
240
|
autoUpload: {
|
|
223
241
|
type: import("vue").PropType<boolean>;
|
|
224
242
|
default: boolean;
|
|
@@ -234,6 +252,18 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
234
252
|
limit: {
|
|
235
253
|
type: import("vue").PropType<number>;
|
|
236
254
|
};
|
|
255
|
+
replaceOnLimit: {
|
|
256
|
+
type: import("vue").PropType<boolean>;
|
|
257
|
+
default: boolean;
|
|
258
|
+
};
|
|
259
|
+
maxSize: {
|
|
260
|
+
type: import("vue").PropType<number>;
|
|
261
|
+
default: undefined;
|
|
262
|
+
};
|
|
263
|
+
sizeExceedMessage: {
|
|
264
|
+
type: import("vue").PropType<string>;
|
|
265
|
+
default: string;
|
|
266
|
+
};
|
|
237
267
|
beforeUpload: {
|
|
238
268
|
type: import("vue").PropType<(rawFile: import("./types").UploadRawFile) => import("../types").Awaitable<void | undefined | null | boolean | File | Blob>>;
|
|
239
269
|
};
|
|
@@ -247,6 +277,9 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
247
277
|
type: import("vue").PropType<(files: File[], uploadFiles: import("./types").UploadUserFile[]) => void>;
|
|
248
278
|
default: () => void;
|
|
249
279
|
};
|
|
280
|
+
onSizeExceed: {
|
|
281
|
+
type: import("vue").PropType<(file: File, maxSize: number) => void>;
|
|
282
|
+
};
|
|
250
283
|
beforeRemove: {
|
|
251
284
|
type: import("vue").PropType<(uploadFile: import("./types").UploadFile, uploadFiles: import("./types").UploadFiles) => import("../types").Awaitable<boolean>>;
|
|
252
285
|
};
|
|
@@ -309,12 +342,15 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
309
342
|
method: string;
|
|
310
343
|
multiple: boolean;
|
|
311
344
|
action: string;
|
|
345
|
+
fileList: import("./types").UploadUserFile[];
|
|
312
346
|
showFileList: boolean;
|
|
313
347
|
accept: string;
|
|
314
|
-
fileList: import("./types").UploadUserFile[];
|
|
315
348
|
autoUpload: boolean;
|
|
316
349
|
listType: import("./types").ListType;
|
|
317
350
|
httpRequest: import("./types").UploadRequestHandler;
|
|
351
|
+
replaceOnLimit: boolean;
|
|
352
|
+
maxSize: number;
|
|
353
|
+
sizeExceedMessage: string;
|
|
318
354
|
onExceed: import("./types").UploadHooks["onExceed"];
|
|
319
355
|
}>;
|
|
320
356
|
__isFragment?: never;
|
|
@@ -335,7 +371,7 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
335
371
|
type: import("vue").PropType<(evt: import("./types").UploadProgressEvent, uploadFile: import("./types").UploadFile, uploadFiles: import("./types").UploadFiles) => void>;
|
|
336
372
|
};
|
|
337
373
|
onChange: {
|
|
338
|
-
type: import("vue").PropType<(uploadFile: import("./types").UploadFile, uploadFiles: import("./types").UploadFiles) => void>;
|
|
374
|
+
type: import("vue").PropType<(uploadFile: import("./types").UploadFile, uploadFiles: import("./types").UploadFiles, uploadInstance?: any) => void>;
|
|
339
375
|
};
|
|
340
376
|
onError: {
|
|
341
377
|
type: import("vue").PropType<(error: Error, uploadFile: import("./types").UploadFile, uploadFiles: import("./types").UploadFiles) => void>;
|
|
@@ -363,6 +399,10 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
363
399
|
type: import("vue").PropType<string>;
|
|
364
400
|
default: string;
|
|
365
401
|
};
|
|
402
|
+
fileList: {
|
|
403
|
+
type: import("vue").PropType<import("./types").UploadUserFile[]>;
|
|
404
|
+
default: never[];
|
|
405
|
+
};
|
|
366
406
|
withCredentials: {
|
|
367
407
|
type: import("vue").PropType<boolean>;
|
|
368
408
|
};
|
|
@@ -374,10 +414,6 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
374
414
|
type: import("vue").PropType<string>;
|
|
375
415
|
default: string;
|
|
376
416
|
};
|
|
377
|
-
fileList: {
|
|
378
|
-
type: import("vue").PropType<import("./types").UploadUserFile[]>;
|
|
379
|
-
default: never[];
|
|
380
|
-
};
|
|
381
417
|
autoUpload: {
|
|
382
418
|
type: import("vue").PropType<boolean>;
|
|
383
419
|
default: boolean;
|
|
@@ -393,6 +429,18 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
393
429
|
limit: {
|
|
394
430
|
type: import("vue").PropType<number>;
|
|
395
431
|
};
|
|
432
|
+
replaceOnLimit: {
|
|
433
|
+
type: import("vue").PropType<boolean>;
|
|
434
|
+
default: boolean;
|
|
435
|
+
};
|
|
436
|
+
maxSize: {
|
|
437
|
+
type: import("vue").PropType<number>;
|
|
438
|
+
default: undefined;
|
|
439
|
+
};
|
|
440
|
+
sizeExceedMessage: {
|
|
441
|
+
type: import("vue").PropType<string>;
|
|
442
|
+
default: string;
|
|
443
|
+
};
|
|
396
444
|
beforeUpload: {
|
|
397
445
|
type: import("vue").PropType<(rawFile: import("./types").UploadRawFile) => import("../types").Awaitable<void | undefined | null | boolean | File | Blob>>;
|
|
398
446
|
};
|
|
@@ -406,6 +454,9 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
406
454
|
type: import("vue").PropType<(files: File[], uploadFiles: import("./types").UploadUserFile[]) => void>;
|
|
407
455
|
default: () => void;
|
|
408
456
|
};
|
|
457
|
+
onSizeExceed: {
|
|
458
|
+
type: import("vue").PropType<(file: File, maxSize: number) => void>;
|
|
459
|
+
};
|
|
409
460
|
beforeRemove: {
|
|
410
461
|
type: import("vue").PropType<(uploadFile: import("./types").UploadFile, uploadFiles: import("./types").UploadFiles) => import("../types").Awaitable<boolean>>;
|
|
411
462
|
};
|
|
@@ -468,12 +519,15 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
468
519
|
method: string;
|
|
469
520
|
multiple: boolean;
|
|
470
521
|
action: string;
|
|
522
|
+
fileList: import("./types").UploadUserFile[];
|
|
471
523
|
showFileList: boolean;
|
|
472
524
|
accept: string;
|
|
473
|
-
fileList: import("./types").UploadUserFile[];
|
|
474
525
|
autoUpload: boolean;
|
|
475
526
|
listType: import("./types").ListType;
|
|
476
527
|
httpRequest: import("./types").UploadRequestHandler;
|
|
528
|
+
replaceOnLimit: boolean;
|
|
529
|
+
maxSize: number;
|
|
530
|
+
sizeExceedMessage: string;
|
|
477
531
|
onExceed: import("./types").UploadHooks["onExceed"];
|
|
478
532
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
479
533
|
$slots: {
|
|
@@ -38,12 +38,14 @@ export interface UploadHooks {
|
|
|
38
38
|
beforeUpload: (rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>;
|
|
39
39
|
beforeRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>;
|
|
40
40
|
onRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
41
|
-
onChange: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
41
|
+
onChange: (uploadFile: UploadFile, uploadFiles: UploadFiles, uploadInstance?: any) => void;
|
|
42
42
|
onPreview: (uploadFile: UploadFile) => void;
|
|
43
43
|
onSuccess: (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
44
44
|
onProgress: (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
45
45
|
onError: (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
|
46
46
|
onExceed: (files: File[], uploadFiles: UploadUserFile[]) => void;
|
|
47
|
+
/** 文件大小超出限制时的回调 */
|
|
48
|
+
onSizeExceed?: (file: File, maxSize: number) => void;
|
|
47
49
|
}
|
|
48
50
|
export interface UploadBasicProps {
|
|
49
51
|
action?: string;
|
|
@@ -63,6 +65,12 @@ export interface UploadBasicProps {
|
|
|
63
65
|
httpRequest?: UploadRequestHandler;
|
|
64
66
|
disabled?: boolean;
|
|
65
67
|
limit?: number;
|
|
68
|
+
/** 当 limit 为 1 时,是否覆盖之前的文件 */
|
|
69
|
+
replaceOnLimit?: boolean;
|
|
70
|
+
/** 文件大小限制(字节) */
|
|
71
|
+
maxSize?: number;
|
|
72
|
+
/** 超出文件大小时的提示信息 */
|
|
73
|
+
sizeExceedMessage?: string;
|
|
66
74
|
}
|
|
67
75
|
export interface UploadEventProps {
|
|
68
76
|
beforeUpload?: UploadHooks['beforeUpload'];
|
|
@@ -74,6 +82,7 @@ export interface UploadEventProps {
|
|
|
74
82
|
onProgress?: UploadHooks['onProgress'];
|
|
75
83
|
onError?: UploadHooks['onError'];
|
|
76
84
|
onExceed?: UploadHooks['onExceed'];
|
|
85
|
+
onSizeExceed?: UploadHooks['onSizeExceed'];
|
|
77
86
|
}
|
|
78
87
|
export interface UploadContentEventProps {
|
|
79
88
|
beforeUpload?: UploadHooks['beforeUpload'];
|
|
@@ -83,9 +92,15 @@ export interface UploadContentEventProps {
|
|
|
83
92
|
onProgress?: (evt: UploadProgressEvent, rawFile: UploadRawFile) => void;
|
|
84
93
|
onError?: (err: UploadAjaxError, rawFile: UploadRawFile) => void;
|
|
85
94
|
onExceed?: UploadHooks['onExceed'];
|
|
95
|
+
onSizeExceed?: UploadHooks['onSizeExceed'];
|
|
96
|
+
}
|
|
97
|
+
export interface UploadContentBasicProps extends Omit<UploadBasicProps, 'fileList'> {
|
|
98
|
+
fileList?: UploadUserFile[];
|
|
99
|
+
/** 当 limit 为 1 时,是否覆盖之前的文件 */
|
|
100
|
+
replaceOnLimit?: boolean;
|
|
86
101
|
}
|
|
87
102
|
export type UploadProps = UploadBasicProps & UploadEventProps;
|
|
88
|
-
export type UploadContentProps =
|
|
103
|
+
export type UploadContentProps = UploadContentBasicProps & UploadContentEventProps;
|
|
89
104
|
export type UploadContentInstance = InstanceType<typeof UploadContent>;
|
|
90
105
|
export interface UploadDraggerProps {
|
|
91
106
|
disabled?: boolean;
|