eztech-core-components 1.0.65 → 1.0.66

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.
@@ -4,14 +4,13 @@
4
4
  <i class="el-icon-loading" /> Түр хүлээнэ үү..
5
5
  </div>
6
6
  <div v-else-if="hrefBlob" class="relative w-full h-[900px]">
7
- <core-pdf-viewer :blob="hrefBlob" />
8
- <!-- <iframe
7
+ <iframe
9
8
  id="pdfFrame"
10
9
  :src="hrefBlob + pdfUrlParams"
11
10
  class="w-full h-full"
12
11
  frameborder="0"
13
12
  @load="handlePrintPdf"
14
- /> -->
13
+ />
15
14
  </div>
16
15
  </el-dialog>
17
16
  </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eztech-core-components",
3
- "version": "1.0.65",
3
+ "version": "1.0.66",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,92 +0,0 @@
1
- <template>
2
- <div class="blob-pdf-viewer" @contextmenu.prevent @selectstart.prevent @dragstart.prevent>
3
- <vue-pdf
4
- :src="pdfLoadingTask"
5
- :page="currentPage"
6
- @num-pages="pageCount = $event"
7
- @password="onPassword"
8
- @error="onError"
9
- style="display: block; width: 100%;"
10
- />
11
- <div class="controls" v-if="pageCount > 1">
12
- <button @click="currentPage--" :disabled="currentPage <= 1">‹ Prev</button>
13
- <span>{{ currentPage }} / {{ pageCount }}</span>
14
- <button @click="currentPage++" :disabled="currentPage >= pageCount">Next ›</button>
15
- </div>
16
- </div>
17
- </template>
18
-
19
- <script>
20
- import vuePdf from 'vue-pdf'
21
- export default {
22
- components: { vuePdf },
23
- props: {
24
- blob: {
25
- type: Blob,
26
- required: true
27
- }
28
- },
29
- data() {
30
- return {
31
- pdfLoadingTask: null,
32
- currentPage: 1,
33
- pageCount: 0
34
- }
35
- },
36
- watch: {
37
- blob: {
38
- immediate: true,
39
- handler(newBlob) {
40
- if (!newBlob) return
41
- const blobUrl = URL.createObjectURL(newBlob)
42
- this.pdfLoadingTask = vuePdf.createLoadingTask(blobUrl)
43
- this.$once('hook:beforeDestroy', () => {
44
- URL.revokeObjectURL(blobUrl)
45
- })
46
- }
47
- }
48
- },
49
- methods: {
50
- onPassword(callback) {
51
- const password = prompt('This PDF is password protected. Enter password:')
52
- callback(password)
53
- },
54
- onError(err) {
55
- this.$emit('error', err)
56
- }
57
- }
58
- }
59
- </script>
60
- <style scoped>
61
- .blob-pdf-viewer {
62
- position: relative;
63
- width: 100%;
64
- height: 900px;
65
- background: #2d2d2d;
66
- overflow: hidden;
67
- -webkit-user-select: none;
68
- user-select: none;
69
- }
70
-
71
- .controls {
72
- position: absolute;
73
- bottom: 20px;
74
- left: 50%;
75
- transform: translateX(-50%);
76
- background: rgba(0,0,0,0.8);
77
- color: white;
78
- padding: 10px 20px;
79
- border-radius: 30px;
80
- font-family: Arial, sans-serif;
81
- z-index: 10;
82
- }
83
-
84
- .controls button {
85
- background: none;
86
- border: none;
87
- color: white;
88
- font-size: 18px;
89
- cursor: pointer;
90
- padding: 0 15px;
91
- }
92
- </style>