@opentinyvue/vue-file-upload 3.28.0 → 3.29.0
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/lib/mobile-first.js +12 -1
- package/lib/pc.js +18 -1
- package/package.json +15 -15
package/lib/mobile-first.js
CHANGED
|
@@ -201,6 +201,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
201
201
|
}, [t2("ui.fileUpload.uploadFile")])])];
|
|
202
202
|
}
|
|
203
203
|
}), createVNode(resolveComponent("icon-plus-circle"), {
|
|
204
|
+
"role": "button",
|
|
205
|
+
"tabindex": "0",
|
|
206
|
+
"aria-label": t2("ui.fileUpload.uploadFile"),
|
|
204
207
|
"custom-class": "sm:hidden w-5 h-5 absolute top-0.5 right-5"
|
|
205
208
|
}, null)]);
|
|
206
209
|
} else if (listType2 === "drag-single") {
|
|
@@ -209,7 +212,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
209
212
|
var defaultClass = "relative h-full border border-dashed border-color-border rounded bg-color-bg-2 align-top hover:cursor-pointer";
|
|
210
213
|
listType2 === "picture-single" && uploadFiles.length && (defaultClass += " hidden");
|
|
211
214
|
defaultContent = createVNode("div", {
|
|
212
|
-
"class": defaultClass
|
|
215
|
+
"class": defaultClass,
|
|
216
|
+
"role": "button",
|
|
217
|
+
"tabindex": "0",
|
|
218
|
+
"aria-label": t2("ui.fileUpload.uploadFile"),
|
|
219
|
+
"onKeydown": function onKeydown(event) {
|
|
220
|
+
return event.key === "Enter" && handleTriggerClick();
|
|
221
|
+
}
|
|
213
222
|
}, [createVNode("div", {
|
|
214
223
|
"class": "absolute w-full top-1/2 left-0 -translate-y-1/2 z-[1] text-center"
|
|
215
224
|
}, [defaultList[type2 || "picture"]])]);
|
|
@@ -521,6 +530,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
521
530
|
var attrs = a($attrs, ["^on[A-Z]"]);
|
|
522
531
|
return createVNode("div", mergeProps(attrs, {
|
|
523
532
|
"data-tag": "tiny-file-upload",
|
|
533
|
+
"role": "group",
|
|
534
|
+
"aria-label": title,
|
|
524
535
|
"class": isDragSingle ? "relative inline-block" : ""
|
|
525
536
|
}), [getDefaultTitle({
|
|
526
537
|
listType,
|
package/lib/pc.js
CHANGED
|
@@ -92,6 +92,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
92
92
|
"class": "trigger-btn"
|
|
93
93
|
}, [createVNode(resolveComponent("tiny-button"), {
|
|
94
94
|
"disabled": disabled,
|
|
95
|
+
"aria-label": t2("ui.fileUpload.uploadFile"),
|
|
95
96
|
"onClick": handleTriggerClick
|
|
96
97
|
}, {
|
|
97
98
|
default: function _default() {
|
|
@@ -140,6 +141,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
140
141
|
var getThumIcon = function getThumIcon2(file) {
|
|
141
142
|
return [showDownload && createVNode("span", {
|
|
142
143
|
"class": "thumb-icon",
|
|
144
|
+
"role": "button",
|
|
145
|
+
"tabindex": "0",
|
|
146
|
+
"aria-label": t("ui.fileUpload.downloadFile"),
|
|
143
147
|
"title": t("ui.fileUpload.downloadFile"),
|
|
144
148
|
"onClick": function onClick() {
|
|
145
149
|
return execDownload(file);
|
|
@@ -148,6 +152,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
148
152
|
"class": "download-icon"
|
|
149
153
|
}, null)]), isEdm && !isFolder && showUpdate && createVNode("span", {
|
|
150
154
|
"class": "thumb-icon",
|
|
155
|
+
"role": "button",
|
|
156
|
+
"tabindex": "0",
|
|
157
|
+
"aria-label": t("ui.fileUpload.updateFile"),
|
|
151
158
|
"title": t("ui.fileUpload.updateFile"),
|
|
152
159
|
"onClick": function onClick() {
|
|
153
160
|
return updateFile(file);
|
|
@@ -156,9 +163,17 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
156
163
|
"class": "refres-icon"
|
|
157
164
|
}, null)]), showDel && createVNode("span", {
|
|
158
165
|
"class": "thumb-icon",
|
|
166
|
+
"role": "button",
|
|
167
|
+
"tabindex": "0",
|
|
168
|
+
"aria-label": t("ui.fileUpload.deleteFile"),
|
|
159
169
|
"title": t("ui.fileUpload.deleteFile"),
|
|
160
170
|
"onClick": function onClick() {
|
|
161
171
|
return handleRemove(file);
|
|
172
|
+
},
|
|
173
|
+
"onKeydown": function onKeydown(event) {
|
|
174
|
+
return handleEnter(event, function() {
|
|
175
|
+
return handleRemove(file);
|
|
176
|
+
});
|
|
162
177
|
}
|
|
163
178
|
}, [createVNode(TinyIconClose, {
|
|
164
179
|
"class": "close-icon"
|
|
@@ -442,7 +457,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
442
457
|
}
|
|
443
458
|
var attrs = a($attrs, ["^on[A-Z]"]);
|
|
444
459
|
return createVNode("div", mergeProps({
|
|
445
|
-
"class": "tiny-file-upload"
|
|
460
|
+
"class": "tiny-file-upload",
|
|
461
|
+
"role": "group",
|
|
462
|
+
"aria-label": title
|
|
446
463
|
}, attrs), [isSaasType ? getDefaultTitle(title, this.showTitle) : "", notice, isPictureCard ? uploadList : "", slots.trigger ? [uploadComponent, defaultSlot] : uploadComponent, !isSaasType && slots.tip && slots.tip(), isPictureCard ? "" : uploadList, previewComponent, encryptDialogComponent]);
|
|
447
464
|
}
|
|
448
465
|
});
|
package/package.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-file-upload",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.29.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./lib/index.js",
|
|
8
8
|
"module": "./lib/index.js",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@opentinyvue/vue-button": "~3.
|
|
11
|
-
"@opentinyvue/vue-common": "~3.
|
|
12
|
-
"@opentinyvue/vue-dialog-box": "~3.
|
|
13
|
-
"@opentinyvue/vue-icon": "~3.
|
|
14
|
-
"@opentinyvue/vue-input": "~3.
|
|
15
|
-
"@opentinyvue/vue-modal": "~3.
|
|
16
|
-
"@opentinyvue/vue-popover": "~3.
|
|
17
|
-
"@opentinyvue/vue-progress": "~3.
|
|
18
|
-
"@opentinyvue/vue-renderless": "~3.
|
|
19
|
-
"@opentinyvue/vue-tooltip": "~3.
|
|
20
|
-
"@opentinyvue/vue-upload": "~3.
|
|
21
|
-
"@opentinyvue/vue-upload-list": "~3.
|
|
22
|
-
"@opentinyvue/vue-switch": "~3.
|
|
23
|
-
"@opentinyvue/vue-theme": "~3.
|
|
10
|
+
"@opentinyvue/vue-button": "~3.29.0",
|
|
11
|
+
"@opentinyvue/vue-common": "~3.29.0",
|
|
12
|
+
"@opentinyvue/vue-dialog-box": "~3.29.0",
|
|
13
|
+
"@opentinyvue/vue-icon": "~3.29.0",
|
|
14
|
+
"@opentinyvue/vue-input": "~3.29.0",
|
|
15
|
+
"@opentinyvue/vue-modal": "~3.29.0",
|
|
16
|
+
"@opentinyvue/vue-popover": "~3.29.0",
|
|
17
|
+
"@opentinyvue/vue-progress": "~3.29.0",
|
|
18
|
+
"@opentinyvue/vue-renderless": "~3.29.0",
|
|
19
|
+
"@opentinyvue/vue-tooltip": "~3.29.0",
|
|
20
|
+
"@opentinyvue/vue-upload": "~3.29.0",
|
|
21
|
+
"@opentinyvue/vue-upload-list": "~3.29.0",
|
|
22
|
+
"@opentinyvue/vue-switch": "~3.29.0",
|
|
23
|
+
"@opentinyvue/vue-theme": "~3.29.0",
|
|
24
24
|
"streamsaver": "2.0.6"
|
|
25
25
|
},
|
|
26
26
|
"types": "index.d.ts",
|