doway-coms 2.10.22 → 2.10.24
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/package.json
CHANGED
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
|
|
120
120
|
</div>
|
|
121
121
|
</a-upload>
|
|
122
|
-
<
|
|
122
|
+
<div ref="pasteFileView">黏贴</div>
|
|
123
123
|
<div v-if="edit !== true && showEmptyText && internalRows.length === 0">
|
|
124
124
|
没有附件信息哦,请编辑添加附件信息
|
|
125
125
|
</div>
|
|
@@ -290,6 +290,12 @@ export default {
|
|
|
290
290
|
this.uploadData.resId = this.resId;
|
|
291
291
|
this.uploadData.picAction = this.internalServiceUrl + "/UploadAttach";
|
|
292
292
|
this.getAttachInfo(this.rows);
|
|
293
|
+
|
|
294
|
+
this.$refs.pasteFileView.addEventListener('paste', async (e) => {
|
|
295
|
+
e.preventDefault();
|
|
296
|
+
await this.pasteFileClick(e)
|
|
297
|
+
})
|
|
298
|
+
|
|
293
299
|
},
|
|
294
300
|
methods: {
|
|
295
301
|
getCurrentToken() {
|
|
@@ -458,26 +464,26 @@ export default {
|
|
|
458
464
|
/**
|
|
459
465
|
* 黏贴附件
|
|
460
466
|
*/
|
|
461
|
-
async pasteFileClick(){
|
|
462
|
-
|
|
467
|
+
async pasteFileClick(e){
|
|
468
|
+
console.debug('e',e)
|
|
469
|
+
const items = e.clipboardData.files;
|
|
463
470
|
console.debug('items',items)
|
|
464
471
|
for (const item of items) {
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
}
|
|
472
|
+
if (item.type.startsWith('image/') || item.type.startsWith('application/')) {
|
|
473
|
+
// this.pasteFile = URL.createObjectURL(item)
|
|
474
|
+
//'复制文件'+this.$store.getters.newId() +'.png'
|
|
475
|
+
let type = item.type
|
|
476
|
+
this.pasteFile = new File([item],`复制文件${this.$store.getters.newId()}.${type.split('/')[1]}` , { type });
|
|
477
|
+
this.uploadPasteFile()
|
|
478
|
+
return
|
|
479
|
+
// console.debug('file',file)
|
|
480
|
+
// this.uploadFileList = [file];
|
|
481
|
+
// const reader = new FileReader();
|
|
482
|
+
// reader.onload = (e) => {
|
|
483
|
+
// console.debug(e)
|
|
484
|
+
// // this.imageSrc = e.target.result;
|
|
485
|
+
// };
|
|
486
|
+
// reader.readAsDataURL(blob);
|
|
481
487
|
}
|
|
482
488
|
}
|
|
483
489
|
},
|