@opentinyvue/vue-file-upload 2.27.0 → 2.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 +17 -2
- package/lib/pc.js +21 -2
- package/package.json +15 -15
package/lib/mobile-first.js
CHANGED
|
@@ -268,6 +268,9 @@ var __vue2_script = defineComponent({
|
|
|
268
268
|
"class": "ml-2"
|
|
269
269
|
}, [t2("ui.fileUpload.uploadFile")])])]), h("icon-plus-circle", {
|
|
270
270
|
"attrs": {
|
|
271
|
+
"role": "button",
|
|
272
|
+
"tabindex": "0",
|
|
273
|
+
"aria-label": t2("ui.fileUpload.uploadFile"),
|
|
271
274
|
"custom-class": "sm:hidden w-5 h-5 absolute top-0.5 right-5"
|
|
272
275
|
}
|
|
273
276
|
})]);
|
|
@@ -277,7 +280,17 @@ var __vue2_script = defineComponent({
|
|
|
277
280
|
var defaultClass = "relative h-full border border-dashed border-color-border rounded bg-color-bg-2 align-top hover:cursor-pointer";
|
|
278
281
|
listType2 === "picture-single" && uploadFiles.length && (defaultClass += " hidden");
|
|
279
282
|
defaultContent = h("div", {
|
|
280
|
-
"class": defaultClass
|
|
283
|
+
"class": defaultClass,
|
|
284
|
+
"attrs": {
|
|
285
|
+
"role": "button",
|
|
286
|
+
"tabindex": "0",
|
|
287
|
+
"aria-label": t2("ui.fileUpload.uploadFile")
|
|
288
|
+
},
|
|
289
|
+
"on": {
|
|
290
|
+
"keydown": function keydown(event) {
|
|
291
|
+
return event.key === "Enter" && handleTriggerClick();
|
|
292
|
+
}
|
|
293
|
+
}
|
|
281
294
|
}, [h("div", {
|
|
282
295
|
"class": "absolute w-full top-1/2 left-0 -translate-y-1/2 z-[1] text-center"
|
|
283
296
|
}, [defaultList[type2 || "picture"]])]);
|
|
@@ -592,7 +605,9 @@ var __vue2_script = defineComponent({
|
|
|
592
605
|
var attrs = a($attrs, ["^on[A-Z]"]);
|
|
593
606
|
return h("div", _mergeJSXProps6([{}, attrs, {
|
|
594
607
|
"attrs": {
|
|
595
|
-
"data-tag": "tiny-file-upload"
|
|
608
|
+
"data-tag": "tiny-file-upload",
|
|
609
|
+
"role": "group",
|
|
610
|
+
"aria-label": title
|
|
596
611
|
},
|
|
597
612
|
"class": isDragSingle ? "relative inline-block" : ""
|
|
598
613
|
}]), [getDefaultTitle({
|
package/lib/pc.js
CHANGED
|
@@ -162,7 +162,8 @@ var __vue2_script = defineComponent({
|
|
|
162
162
|
"class": "trigger-btn"
|
|
163
163
|
}, [h("tiny-button", {
|
|
164
164
|
"attrs": {
|
|
165
|
-
"disabled": disabled
|
|
165
|
+
"disabled": disabled,
|
|
166
|
+
"aria-label": t2("ui.fileUpload.uploadFile")
|
|
166
167
|
},
|
|
167
168
|
"on": {
|
|
168
169
|
"click": handleTriggerClick
|
|
@@ -209,6 +210,9 @@ var __vue2_script = defineComponent({
|
|
|
209
210
|
return [showDownload && h("span", {
|
|
210
211
|
"class": "thumb-icon",
|
|
211
212
|
"attrs": {
|
|
213
|
+
"role": "button",
|
|
214
|
+
"tabindex": "0",
|
|
215
|
+
"aria-label": t("ui.fileUpload.downloadFile"),
|
|
212
216
|
"title": t("ui.fileUpload.downloadFile")
|
|
213
217
|
},
|
|
214
218
|
"on": {
|
|
@@ -221,6 +225,9 @@ var __vue2_script = defineComponent({
|
|
|
221
225
|
})]), isEdm && !isFolder && showUpdate && h("span", {
|
|
222
226
|
"class": "thumb-icon",
|
|
223
227
|
"attrs": {
|
|
228
|
+
"role": "button",
|
|
229
|
+
"tabindex": "0",
|
|
230
|
+
"aria-label": t("ui.fileUpload.updateFile"),
|
|
224
231
|
"title": t("ui.fileUpload.updateFile")
|
|
225
232
|
},
|
|
226
233
|
"on": {
|
|
@@ -233,11 +240,19 @@ var __vue2_script = defineComponent({
|
|
|
233
240
|
})]), showDel && h("span", {
|
|
234
241
|
"class": "thumb-icon",
|
|
235
242
|
"attrs": {
|
|
243
|
+
"role": "button",
|
|
244
|
+
"tabindex": "0",
|
|
245
|
+
"aria-label": t("ui.fileUpload.deleteFile"),
|
|
236
246
|
"title": t("ui.fileUpload.deleteFile")
|
|
237
247
|
},
|
|
238
248
|
"on": {
|
|
239
249
|
"click": function click() {
|
|
240
250
|
return handleRemove(file);
|
|
251
|
+
},
|
|
252
|
+
"keydown": function keydown(event) {
|
|
253
|
+
return handleEnter(event, function() {
|
|
254
|
+
return handleRemove(file);
|
|
255
|
+
});
|
|
241
256
|
}
|
|
242
257
|
}
|
|
243
258
|
}, [h(TinyIconClose, {
|
|
@@ -525,7 +540,11 @@ var __vue2_script = defineComponent({
|
|
|
525
540
|
}
|
|
526
541
|
var attrs = a($attrs, ["^on[A-Z]"]);
|
|
527
542
|
return h("div", _mergeJSXProps6([{
|
|
528
|
-
"class": "tiny-file-upload"
|
|
543
|
+
"class": "tiny-file-upload",
|
|
544
|
+
"attrs": {
|
|
545
|
+
"role": "group",
|
|
546
|
+
"aria-label": title
|
|
547
|
+
}
|
|
529
548
|
}, attrs]), [isSaasType ? getDefaultTitle(title, this.showTitle) : "", notice, isPictureCard ? uploadList : "", slots.trigger ? [uploadComponent, defaultSlot] : uploadComponent, !isSaasType && slots.tip && slots.tip(), isPictureCard ? "" : uploadList, previewComponent, encryptDialogComponent]);
|
|
530
549
|
}
|
|
531
550
|
});
|
package/package.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-file-upload",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.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": "~2.
|
|
11
|
-
"@opentinyvue/vue-common": "~2.
|
|
12
|
-
"@opentinyvue/vue-dialog-box": "~2.
|
|
13
|
-
"@opentinyvue/vue-icon": "~2.
|
|
14
|
-
"@opentinyvue/vue-input": "~2.
|
|
15
|
-
"@opentinyvue/vue-modal": "~2.
|
|
16
|
-
"@opentinyvue/vue-popover": "~2.
|
|
17
|
-
"@opentinyvue/vue-progress": "~2.
|
|
18
|
-
"@opentinyvue/vue-renderless": "~3.
|
|
19
|
-
"@opentinyvue/vue-tooltip": "~2.
|
|
20
|
-
"@opentinyvue/vue-upload": "~2.
|
|
21
|
-
"@opentinyvue/vue-upload-list": "~2.
|
|
22
|
-
"@opentinyvue/vue-switch": "~2.
|
|
23
|
-
"@opentinyvue/vue-theme": "~3.
|
|
10
|
+
"@opentinyvue/vue-button": "~2.29.0",
|
|
11
|
+
"@opentinyvue/vue-common": "~2.29.0",
|
|
12
|
+
"@opentinyvue/vue-dialog-box": "~2.29.0",
|
|
13
|
+
"@opentinyvue/vue-icon": "~2.29.0",
|
|
14
|
+
"@opentinyvue/vue-input": "~2.29.0",
|
|
15
|
+
"@opentinyvue/vue-modal": "~2.29.0",
|
|
16
|
+
"@opentinyvue/vue-popover": "~2.29.0",
|
|
17
|
+
"@opentinyvue/vue-progress": "~2.29.0",
|
|
18
|
+
"@opentinyvue/vue-renderless": "~3.29.0",
|
|
19
|
+
"@opentinyvue/vue-tooltip": "~2.29.0",
|
|
20
|
+
"@opentinyvue/vue-upload": "~2.29.0",
|
|
21
|
+
"@opentinyvue/vue-upload-list": "~2.29.0",
|
|
22
|
+
"@opentinyvue/vue-switch": "~2.29.0",
|
|
23
|
+
"@opentinyvue/vue-theme": "~3.29.0",
|
|
24
24
|
"streamsaver": "2.0.6"
|
|
25
25
|
},
|
|
26
26
|
"types": "index.d.ts",
|