zydx-plus 1.33.436 → 1.33.438

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.33.436",
3
+ "version": "1.33.438",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -8,7 +8,7 @@
8
8
  </div>
9
9
  </div>
10
10
  <div class="paint-cont">
11
- <Sketchpad ref="sketchpad"></Sketchpad>
11
+ <Sketchpad ref="sketchpad" :top="false"></Sketchpad>
12
12
  </div>
13
13
  <div class="tool-cont" :style="{left: left + 'px', top: top + 'px'}">
14
14
  <div class="tool"
@@ -82,7 +82,7 @@
82
82
  </div>
83
83
  </div>
84
84
  </div>
85
- <dragPopup v-if="show" :dragStatus="false" :minimizeCir="false" :enlargeShow="false" @close="close">
85
+ <dragPopup :width="600" :height="417" v-if="show" :dragStatus="false" :minimizeCir="false" :enlargeShow="false" @close="close">
86
86
  <template #content>
87
87
  <div class="can">
88
88
  <div class="can-cont" :id="ids + 'cont'">
@@ -136,6 +136,7 @@ export default {
136
136
  {id: 'formula', img: require('../src/img/gongsi.png'), name: '公式'},
137
137
  {id: 'rubber', img: require('../src/img/shanchu.png'), name: '橡皮'},
138
138
  {id: 'clear', img: require('../src/img/qingchu.png'), name: '清屏'},
139
+ {id: 'full', img: require('../src/img/quanping.png'), name: '全屏'},
139
140
  ],
140
141
  colorData: [
141
142
  {color: 'rgb(29, 29, 29)', name: '颜色-黑色', id: 'black'},
@@ -204,7 +205,8 @@ export default {
204
205
  num: '',
205
206
  ctx: null,
206
207
  canvasEle: null,
207
- appData: ''
208
+ appData: '',
209
+ full: false
208
210
  }
209
211
  },
210
212
  props: {
@@ -239,6 +241,7 @@ export default {
239
241
  methods: {
240
242
  exportTap() {
241
243
  this.$refs.sketchpad.exportImg().then(res => {
244
+ document.body.style.overflow = 'visible'
242
245
  this.$emit('exportImg', res)
243
246
  })
244
247
  },
@@ -333,6 +336,34 @@ export default {
333
336
  this.link() // 画线
334
337
  }, 0)
335
338
  }
339
+ if(this.toolId === 'full') {
340
+ if(this.full) {
341
+ this.cancelFullscreen()
342
+ }else {
343
+ this.fullScreen(document.getElementById(this.ids))
344
+ }
345
+ this.full = !this.full
346
+ }
347
+ },
348
+ fullScreen(element) {
349
+ if (element.requestFullScreen) {
350
+ element.requestFullScreen()
351
+ } else if (element.webkitRequestFullScreen) {
352
+ element.webkitRequestFullScreen()
353
+ } else if (element.mozRequestFullScreen) {
354
+ element.mozRequestFullScreen()
355
+ }
356
+ },
357
+ cancelFullscreen() {
358
+ if (document.exitFullscreen) {
359
+ document.exitFullscreen();
360
+ } else if (document.msExitFullscreen) {
361
+ document.msExitFullscreen();
362
+ } else if (document.mozCancelFullScreen) {
363
+ document.mozCancelFullScreen();
364
+ } else if (document.webkitExitFullscreen) {
365
+ document.webkitExitFullscreen();
366
+ }
336
367
  },
337
368
  dataURLtoBlob(dataurl) {
338
369
  let arr = dataurl.split(',');
@@ -371,7 +402,7 @@ export default {
371
402
  formData.append('file', file);
372
403
  // xhr.open('POST', 'https://192.168.8.81:8081/zydx/latex/get')
373
404
  // xhr.setRequestHeader('Authorization', '80f6a0c2-eb43-4f4a-8f3e-ab3bf7b447be')
374
- xhr.open('GET', '/zydx/latex/get')
405
+ xhr.open('POST', '/zydx/latex/get')
375
406
  xhr.setRequestHeader('Authorization', token)
376
407
  this.error = true
377
408
  xhr.onreadystatechange = () => {
@@ -495,6 +526,7 @@ export default {
495
526
  return id.replace(/[0-9]/g, '')
496
527
  },
497
528
  cancel() {
529
+ document.body.style.overflow = 'visible'
498
530
  this.$emit('cancel')
499
531
  }
500
532
  }
@@ -528,6 +560,7 @@ export default {
528
560
  .can {
529
561
  padding: 10px;
530
562
  height: 100%;
563
+ box-sizing: border-box;
531
564
  }
532
565
  .can-pop-but-cont{
533
566
  text-align: center;
@@ -77,6 +77,12 @@ export default {
77
77
  // editor: null
78
78
  }
79
79
  },
80
+ props: {
81
+ top: {
82
+ type: Boolean,
83
+ default: true
84
+ }
85
+ },
80
86
  mounted() {
81
87
  // 鼠标移入
82
88
  this.$refs.reactRef.addEventListener('mouseover', () => {
@@ -131,9 +137,11 @@ export default {
131
137
  },
132
138
  handleMountedEditor(editor) {
133
139
  editorAPP = editor
134
- setTimeout(() => {
135
- document.documentElement.scrollTop = 0
136
- }, 0)
140
+ if(this.top) {
141
+ setTimeout(() => {
142
+ document.documentElement.scrollTop = 0
143
+ }, 0)
144
+ }
137
145
  },
138
146
  setOpacityForNextShapes(opacity){
139
147
  editorAPP.setOpacityForNextShapes(opacity)
package/src/index.js CHANGED
@@ -83,7 +83,7 @@ function install(app) {
83
83
  }
84
84
 
85
85
  export default {
86
- version: '1.33.436',
86
+ version: '1.33.438',
87
87
  install,
88
88
  Calendar,
89
89
  Message,