askbot-dragon 1.6.73-beta → 1.6.74-beta
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 +1 -1
- package/src/components/previewPdf.vue +18 -15
package/package.json
CHANGED
|
@@ -173,7 +173,7 @@ export default {
|
|
|
173
173
|
previewKnowledgeId:"",
|
|
174
174
|
showSummary:true,
|
|
175
175
|
iframeHeight:"100%",
|
|
176
|
-
isDownload:false,
|
|
176
|
+
isDownload: false,
|
|
177
177
|
textWatermarkStr:""
|
|
178
178
|
}
|
|
179
179
|
},
|
|
@@ -433,21 +433,24 @@ export default {
|
|
|
433
433
|
if (res.data) {
|
|
434
434
|
if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
|
|
435
435
|
if (isMobile()) {
|
|
436
|
-
|
|
437
|
-
const
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
436
|
+
|
|
437
|
+
const textArea = document.createElement("textarea");
|
|
438
|
+
// 在 textarea 中插入需要复制的文本
|
|
439
|
+
textArea.value = res.data;
|
|
440
|
+
// 将 textarea 添加到文档中
|
|
441
|
+
document.body.appendChild(textArea);
|
|
442
|
+
//选中 textarea 的内容
|
|
443
|
+
textArea.select();
|
|
444
|
+
var successful =document.execCommand('copy');
|
|
445
|
+
console.log(successful, 'successful');
|
|
446
|
+
if(successful) {
|
|
447
|
+
Toast('下载地址已复制,请前往Safari浏览器访问下载')} else {
|
|
448
|
+
Toast('请允许复制内容到剪贴板')
|
|
449
|
+
}
|
|
450
|
+
// 移除 textarea 元素
|
|
451
|
+
document.body.removeChild(textArea);
|
|
449
452
|
this.close()
|
|
450
|
-
|
|
453
|
+
|
|
451
454
|
} else {
|
|
452
455
|
navigator.clipboard.writeText(res.data)
|
|
453
456
|
this.$message.success({
|