md
This commit is contained in:
parent
1760f48746
commit
6f73054981
@ -60,6 +60,10 @@
|
||||
<!-- </div> -->
|
||||
<!-- </el-scrollbar> -->
|
||||
</div>
|
||||
<!-- <div ref="cpImg" style="z-index: -999;">
|
||||
<img
|
||||
src="http://gips2.baidu.com/it/u=1070828945,3304149431&fm=3028&app=3028&f=PNG&fmt=auto&q=75&size=f150_150">
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -163,10 +167,9 @@ export default {
|
||||
this.$emit("close");
|
||||
},
|
||||
async copyImage() {
|
||||
if (navigator.clipboard && window.isSecureContext) {
|
||||
const canvas=this.$refs.pdf.$refs.canvas;
|
||||
// console.log('===>XdPdfWrapper===>', canvas);
|
||||
let dataURL = canvas.toDataURL({ pixelRatio: 1 });
|
||||
const canvas=this.$refs.pdf.$refs.canvas;
|
||||
let dataURL = canvas.toDataURL({ pixelRatio: 1 });
|
||||
try {
|
||||
const data = await fetch(dataURL);
|
||||
const blob = await data.blob();
|
||||
let ClipboardItem = window.ClipboardItem;
|
||||
@ -176,10 +179,9 @@ export default {
|
||||
}),
|
||||
]);
|
||||
this.$modal.msgSuccess('复制成功');
|
||||
}else{
|
||||
} catch (e) {
|
||||
this.$modal.msgError('您的浏览器不支持复制,请截图!');
|
||||
}
|
||||
|
||||
},
|
||||
initA4List(){
|
||||
this.cacheA4FileList=[];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user