askbot-dragon 1.8.31-beta → 1.8.33-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
CHANGED
package/src/assets/js/common.js
CHANGED
|
@@ -86,23 +86,23 @@ function newInitWaterMark(elId, textValue) {
|
|
|
86
86
|
|
|
87
87
|
watermark_cols: 0, //水印列数
|
|
88
88
|
|
|
89
|
-
watermark_x_space:
|
|
89
|
+
watermark_x_space: 60, //水印x轴间隔
|
|
90
90
|
|
|
91
|
-
watermark_y_space:
|
|
91
|
+
watermark_y_space: 90, //水印y轴间隔
|
|
92
92
|
|
|
93
|
-
watermark_color: "
|
|
93
|
+
watermark_color: "#949494", //水印字体颜色
|
|
94
94
|
|
|
95
|
-
watermark_alpha: 0.
|
|
95
|
+
watermark_alpha: 0.15, //水印透明度
|
|
96
96
|
|
|
97
|
-
watermark_fontsize: "
|
|
97
|
+
watermark_fontsize: "24px", //水印字体大小
|
|
98
98
|
|
|
99
|
-
watermark_font: "
|
|
99
|
+
watermark_font: '-apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif', //水印字体
|
|
100
100
|
|
|
101
|
-
watermark_width:
|
|
101
|
+
watermark_width: 150, //水印宽度
|
|
102
102
|
|
|
103
103
|
watermark_height: 60, //水印长度
|
|
104
104
|
|
|
105
|
-
watermark_angle:
|
|
105
|
+
watermark_angle: 15 //水印倾斜度数
|
|
106
106
|
|
|
107
107
|
};
|
|
108
108
|
let textWatermarkValue = textValue;
|
|
@@ -238,7 +238,7 @@ function newInitWaterMark(elId, textValue) {
|
|
|
238
238
|
|
|
239
239
|
mask_div.style.textAlign = "center";
|
|
240
240
|
|
|
241
|
-
mask_div.style.width =
|
|
241
|
+
mask_div.style.width = 'auto';
|
|
242
242
|
|
|
243
243
|
mask_div.style.height = defaultSettings.watermark_width + "px";
|
|
244
244
|
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
></excel-view>
|
|
19
19
|
<pdf-view v-else-if="fileType === 'PDF'" ref="pdfView" :split_paragraphs="splitParagraph" :ossPath="url" :isPC="isPC" :textWatermarkStr="textWatermarkStr"></pdf-view>
|
|
20
20
|
<mark-down-view v-else-if="fileType === 'MD'" :url="url" :split_paragraphs="splitParagraph" :textWatermarkStr="textWatermarkStr"></mark-down-view>
|
|
21
|
-
<
|
|
22
|
-
<div class="preview_iframe_html" style="text-align:left" v-html="fileText"></div>
|
|
23
|
-
</
|
|
21
|
+
<template v-else-if="fileType === 'URL'">
|
|
22
|
+
<div class="preview_iframe_html" id="preview_iframe_html" style="text-align:left" v-html="fileText"></div>
|
|
23
|
+
</template>
|
|
24
24
|
</div>
|
|
25
25
|
<template v-if="splitParagraph.length > 1 && fileType !== 'XLS' && fileType !== 'XLSX'">
|
|
26
26
|
<div class="btn_footer" v-if="!isPC">
|
|
@@ -42,6 +42,7 @@ import DocView from "./docView";
|
|
|
42
42
|
import ExcelView from "./excelView";
|
|
43
43
|
import PdfView from "./pdfView";
|
|
44
44
|
import MarkDownView from "./markDownView";
|
|
45
|
+
import { newInitWaterMark } from "../../assets/js/common";
|
|
45
46
|
export default {
|
|
46
47
|
name: "newPositionPreview",
|
|
47
48
|
components: { MarkDownView, PdfView, ExcelView, DocView },
|
|
@@ -287,6 +288,9 @@ export default {
|
|
|
287
288
|
dom.style.backgroundImage = 'none';
|
|
288
289
|
}
|
|
289
290
|
this.setColor()
|
|
291
|
+
if (this.textWatermarkStr){
|
|
292
|
+
newInitWaterMark('preview_iframe_html',this.textWatermarkStr)
|
|
293
|
+
}
|
|
290
294
|
})
|
|
291
295
|
this.$emit('loadingSuccess');
|
|
292
296
|
return;
|
|
@@ -313,6 +317,9 @@ export default {
|
|
|
313
317
|
dom.style.backgroundImage = 'none';
|
|
314
318
|
}
|
|
315
319
|
this.setColor()
|
|
320
|
+
if (this.textWatermarkStr){
|
|
321
|
+
newInitWaterMark('preview_iframe_html',this.textWatermarkStr)
|
|
322
|
+
}
|
|
316
323
|
})
|
|
317
324
|
this.$emit('loadingSuccess');
|
|
318
325
|
}
|
|
@@ -329,6 +336,9 @@ export default {
|
|
|
329
336
|
dom.style.backgroundImage = 'none';
|
|
330
337
|
}
|
|
331
338
|
this.setColor()
|
|
339
|
+
if (this.textWatermarkStr){
|
|
340
|
+
newInitWaterMark('preview_iframe_html',this.textWatermarkStr)
|
|
341
|
+
}
|
|
332
342
|
})
|
|
333
343
|
this.$emit('loadingSuccess');
|
|
334
344
|
}
|
|
@@ -307,9 +307,6 @@ export default {
|
|
|
307
307
|
// 将文本 div 添加到覆盖层中
|
|
308
308
|
let pagesDiv = document.getElementById('canvas-wrapper' + pageIndex);
|
|
309
309
|
pagesDiv.appendChild(textDiv)
|
|
310
|
-
if (this.textWatermarkStr){
|
|
311
|
-
newInitWaterMark('canvas-wrapper' + pageIndex, this.textWatermarkStr)
|
|
312
|
-
}
|
|
313
310
|
})
|
|
314
311
|
this.renderInProgress = false;
|
|
315
312
|
this.$set(pageData,'loading',false)
|
|
@@ -645,6 +642,9 @@ export default {
|
|
|
645
642
|
console.log('ossPath',this.ossPath)
|
|
646
643
|
// this.clearPages();
|
|
647
644
|
// this.loadPdf();
|
|
645
|
+
if (this.textWatermarkStr){
|
|
646
|
+
newInitWaterMark('pdfViewPage', this.textWatermarkStr)
|
|
647
|
+
}
|
|
648
648
|
},
|
|
649
649
|
beforeDestroy() {
|
|
650
650
|
window.removeEventListener("resize", this.onResize);
|