zydx-plus 1.32.241 → 1.32.243

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zydx-plus",
3
- "version": "1.32.241",
3
+ "version": "1.32.243",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -21,7 +21,7 @@
21
21
  "author": "",
22
22
  "dependencies": {
23
23
  "vue-draggable-next": "^2.1.1",
24
- "pdfjs-dist": "^2.0.943",
24
+ "pdfjs-dist": "^2.2.228",
25
25
  "snabbdom": "^3.5.1",
26
26
  "katex": "^0.15.6",
27
27
  "simple-mind-map": "^0.6.14",
@@ -97,7 +97,7 @@ export default {
97
97
  },
98
98
  methods: {
99
99
  flipLeft(e,v) {
100
- if(e >= this.pdfPages) {
100
+ if(e > this.pdfPages) {
101
101
  this.pageIndex = this.pdfPages
102
102
  return
103
103
  }else {
@@ -135,7 +135,11 @@ export default {
135
135
  if(that.imgArr[that.pageIndex - 1] !== undefined) {
136
136
  that.oneShow = that.pageIndex !== 1
137
137
  }
138
- const loadingTask = PdfJs.getDocument(this.source)
138
+ const loadingTask = PdfJs.getDocument({
139
+ url: this.source,
140
+ cMapUrl: "https://cdn.jsdelivr.net/npm/pdfjs-dist@2.2.228/cmaps/",
141
+ cMapPacked: true
142
+ })
139
143
  loadingTask.promise.then((pdf) => {
140
144
  that.pdfPages = pdf.numPages // 获取pdf文件的总页数
141
145
  pdf.getPage(that.pageIndex).then(function (page) {
@@ -93,7 +93,11 @@ export default {
93
93
  },
94
94
  init() {
95
95
  let that = this
96
- const loadingTask = PdfJs.getDocument(this.url)
96
+ const loadingTask = PdfJs.getDocument({
97
+ url: this.url,
98
+ cMapUrl: "https://cdn.jsdelivr.net/npm/pdfjs-dist@2.2.228/cmaps/",
99
+ cMapPacked: true
100
+ })
97
101
  loadingTask.promise.then((pdf) => {
98
102
  that.pdfPages = pdf.numPages // 获取pdf文件的总页数
99
103
  let page = pdf.numPages
package/src/index.js CHANGED
@@ -79,7 +79,7 @@ function install(app) {
79
79
  }
80
80
 
81
81
  export default {
82
- version: '1.32.241',
82
+ version: '1.32.243',
83
83
  install,
84
84
  Calendar,
85
85
  Message,