zydx-plus 1.33.437 → 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.437",
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: {
@@ -334,6 +336,34 @@ export default {
334
336
  this.link() // 画线
335
337
  }, 0)
336
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
+ }
337
367
  },
338
368
  dataURLtoBlob(dataurl) {
339
369
  let arr = dataurl.split(',');
@@ -372,7 +402,7 @@ export default {
372
402
  formData.append('file', file);
373
403
  // xhr.open('POST', 'https://192.168.8.81:8081/zydx/latex/get')
374
404
  // xhr.setRequestHeader('Authorization', '80f6a0c2-eb43-4f4a-8f3e-ab3bf7b447be')
375
- xhr.open('GET', '/zydx/latex/get')
405
+ xhr.open('POST', '/zydx/latex/get')
376
406
  xhr.setRequestHeader('Authorization', token)
377
407
  this.error = true
378
408
  xhr.onreadystatechange = () => {
@@ -530,6 +560,7 @@ export default {
530
560
  .can {
531
561
  padding: 10px;
532
562
  height: 100%;
563
+ box-sizing: border-box;
533
564
  }
534
565
  .can-pop-but-cont{
535
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.437',
86
+ version: '1.33.438',
87
87
  install,
88
88
  Calendar,
89
89
  Message,