askbot-dragon 1.4.37 → 1.4.39
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/public/index.html +4 -4
- package/src/components/previewPdf.vue +25 -21
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.5.141/pdf_viewer.min.css" integrity="sha512-Jf9DLkegLgARLR151csVkPvcVt4cOUhslrSZwiTAe9mqFL/BbYRDmxCOioCtbHifEgjsBFbrVhOMQ3mYPDLrqQ==" crossorigin="anonymous" referrerpolicy="no-referrer" /> -->
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
<script src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf.min.js"
|
|
37
|
-
<script src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf.worker.min.js"
|
|
38
|
-
<script src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf_viewer.js"
|
|
39
|
-
<link rel="stylesheet" href="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf_viewer_01.css"
|
|
36
|
+
<script src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf.min.js" referrerpolicy="no-referrer"></script>
|
|
37
|
+
<script src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf.worker.min.js" referrerpolicy="no-referrer"></script>
|
|
38
|
+
<script src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf_viewer.js" referrerpolicy="no-referrer"></script>
|
|
39
|
+
<link rel="stylesheet" href="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf_viewer_01.css" referrerpolicy="no-referrer" />
|
|
40
40
|
<!-- hammer.js -->
|
|
41
41
|
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/hammer.js/2.0.8/hammer.min.js" integrity="sha512-UXumZrZNiOwnTcZSHLOfcTs0aos2MzBWHXOHOuB0J/R44QB0dwY5JgfbvljXcklVf65Gc4El6RjZ+lnwd2az2g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> -->
|
|
42
42
|
<style>
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
:direction="previewShowPopup ? 'btt' : 'rtl'"
|
|
43
43
|
:size="previewShowPopup ? '90%' : '65%'"
|
|
44
44
|
custom-class="pdf-preview-drawer"
|
|
45
|
+
v-if="drawer"
|
|
45
46
|
>
|
|
46
47
|
<!-- v-else-if="drawer" -->
|
|
47
48
|
<div class="drawer-footer">
|
|
@@ -50,29 +51,31 @@
|
|
|
50
51
|
<i class="iconfont guoran-shanchu"></i>
|
|
51
52
|
</section>
|
|
52
53
|
</div>
|
|
53
|
-
<
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
<template v-else>
|
|
57
|
-
<div v-if="fileType == 'VIDEO'" style="width: 100%;height:calc(100% - 60px)">
|
|
58
|
-
<video :src="url" controls width="100%;" height="98%"></video>
|
|
59
|
-
</div>
|
|
60
|
-
<div v-else-if="fileType == 'HTML'" style="width: 100%;height:calc(100% - 60px)">
|
|
61
|
-
<div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
|
|
62
|
-
</div>
|
|
63
|
-
<template v-else-if="url.includes('https://www') || url.includes('http://www')">
|
|
64
|
-
<iframe class="preview_iframe"
|
|
65
|
-
:src="url"
|
|
66
|
-
width="100%"
|
|
67
|
-
height="100%"
|
|
68
|
-
scrolling="100%"
|
|
69
|
-
frameborder="no"
|
|
70
|
-
border="0"></iframe>
|
|
54
|
+
<div id="drawer_content_pre">
|
|
55
|
+
<template v-if="tagIds && tagIds.length != 0 && drawer">
|
|
56
|
+
<pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord"></pdfPosition>
|
|
71
57
|
</template>
|
|
72
58
|
<template v-else>
|
|
73
|
-
<
|
|
59
|
+
<div v-if="fileType == 'VIDEO'" style="width: 100%;height:calc(100% - 60px)">
|
|
60
|
+
<video :src="url" controls width="100%;" height="98%"></video>
|
|
61
|
+
</div>
|
|
62
|
+
<div v-else-if="fileType == 'HTML'" style="width: 100%;height:calc(100% - 60px)">
|
|
63
|
+
<div class="preview_iframe_html" style="text-algin:left" v-html="fileText"></div>
|
|
64
|
+
</div>
|
|
65
|
+
<template v-else-if="url.includes('https://www') || url.includes('http://www')">
|
|
66
|
+
<iframe class="preview_iframe"
|
|
67
|
+
:src="url"
|
|
68
|
+
width="100%"
|
|
69
|
+
height="100%"
|
|
70
|
+
scrolling="100%"
|
|
71
|
+
frameborder="no"
|
|
72
|
+
border="0"></iframe>
|
|
73
|
+
</template>
|
|
74
|
+
<template v-else>
|
|
75
|
+
<iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
|
|
76
|
+
</template>
|
|
74
77
|
</template>
|
|
75
|
-
</
|
|
78
|
+
</div>
|
|
76
79
|
<div class="loading_img" v-show="loading">
|
|
77
80
|
<img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif" alt="">
|
|
78
81
|
</div>
|
|
@@ -81,6 +84,7 @@
|
|
|
81
84
|
|
|
82
85
|
<script>
|
|
83
86
|
import pdfPosition from './pdfPosition.vue'
|
|
87
|
+
import { zoomElement } from '../assets/js/hammer'
|
|
84
88
|
export default {
|
|
85
89
|
data () {
|
|
86
90
|
return {
|
|
@@ -95,7 +99,7 @@ export default {
|
|
|
95
99
|
}
|
|
96
100
|
},
|
|
97
101
|
mounted() {
|
|
98
|
-
|
|
102
|
+
zoomElement(document.getElementById('drawer_content_pre'))
|
|
99
103
|
},
|
|
100
104
|
props:{
|
|
101
105
|
url:{
|