zydx-plus 1.33.437 → 1.33.439
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
|
Binary file
|
|
@@ -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'">
|
|
@@ -111,6 +111,7 @@
|
|
|
111
111
|
<script>
|
|
112
112
|
import Sketchpad from '../../sketchpad/src/sketchpad'
|
|
113
113
|
import dragPopup from '../../dragPopup/src/dragPopup'
|
|
114
|
+
import Mess from '../../tipBox/index'
|
|
114
115
|
|
|
115
116
|
let stayTime = 0
|
|
116
117
|
let timer = null
|
|
@@ -136,6 +137,7 @@ export default {
|
|
|
136
137
|
{id: 'formula', img: require('../src/img/gongsi.png'), name: '公式'},
|
|
137
138
|
{id: 'rubber', img: require('../src/img/shanchu.png'), name: '橡皮'},
|
|
138
139
|
{id: 'clear', img: require('../src/img/qingchu.png'), name: '清屏'},
|
|
140
|
+
{id: 'full', img: require('../src/img/quanping.png'), name: '全屏'},
|
|
139
141
|
],
|
|
140
142
|
colorData: [
|
|
141
143
|
{color: 'rgb(29, 29, 29)', name: '颜色-黑色', id: 'black'},
|
|
@@ -204,7 +206,8 @@ export default {
|
|
|
204
206
|
num: '',
|
|
205
207
|
ctx: null,
|
|
206
208
|
canvasEle: null,
|
|
207
|
-
appData: ''
|
|
209
|
+
appData: '',
|
|
210
|
+
full: false
|
|
208
211
|
}
|
|
209
212
|
},
|
|
210
213
|
props: {
|
|
@@ -238,9 +241,17 @@ export default {
|
|
|
238
241
|
},
|
|
239
242
|
methods: {
|
|
240
243
|
exportTap() {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
+
Mess({
|
|
245
|
+
type: 'text',
|
|
246
|
+
cancelShow: false,
|
|
247
|
+
promptContent: '保存白板后,白板内容将无法再做修改'
|
|
248
|
+
}).then((res) => {
|
|
249
|
+
this.$refs.sketchpad.exportImg().then(res => {
|
|
250
|
+
document.body.style.overflow = 'visible'
|
|
251
|
+
this.$emit('exportImg', res)
|
|
252
|
+
})
|
|
253
|
+
}).catch(() => {
|
|
254
|
+
console.log('取消')
|
|
244
255
|
})
|
|
245
256
|
},
|
|
246
257
|
// 添加公式图片
|
|
@@ -334,6 +345,34 @@ export default {
|
|
|
334
345
|
this.link() // 画线
|
|
335
346
|
}, 0)
|
|
336
347
|
}
|
|
348
|
+
if(this.toolId === 'full') {
|
|
349
|
+
if(this.full) {
|
|
350
|
+
this.cancelFullscreen()
|
|
351
|
+
}else {
|
|
352
|
+
this.fullScreen(document.getElementById(this.ids))
|
|
353
|
+
}
|
|
354
|
+
this.full = !this.full
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
fullScreen(element) {
|
|
358
|
+
if (element.requestFullScreen) {
|
|
359
|
+
element.requestFullScreen()
|
|
360
|
+
} else if (element.webkitRequestFullScreen) {
|
|
361
|
+
element.webkitRequestFullScreen()
|
|
362
|
+
} else if (element.mozRequestFullScreen) {
|
|
363
|
+
element.mozRequestFullScreen()
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
cancelFullscreen() {
|
|
367
|
+
if (document.exitFullscreen) {
|
|
368
|
+
document.exitFullscreen();
|
|
369
|
+
} else if (document.msExitFullscreen) {
|
|
370
|
+
document.msExitFullscreen();
|
|
371
|
+
} else if (document.mozCancelFullScreen) {
|
|
372
|
+
document.mozCancelFullScreen();
|
|
373
|
+
} else if (document.webkitExitFullscreen) {
|
|
374
|
+
document.webkitExitFullscreen();
|
|
375
|
+
}
|
|
337
376
|
},
|
|
338
377
|
dataURLtoBlob(dataurl) {
|
|
339
378
|
let arr = dataurl.split(',');
|
|
@@ -372,7 +411,7 @@ export default {
|
|
|
372
411
|
formData.append('file', file);
|
|
373
412
|
// xhr.open('POST', 'https://192.168.8.81:8081/zydx/latex/get')
|
|
374
413
|
// xhr.setRequestHeader('Authorization', '80f6a0c2-eb43-4f4a-8f3e-ab3bf7b447be')
|
|
375
|
-
xhr.open('
|
|
414
|
+
xhr.open('POST', '/zydx/latex/get')
|
|
376
415
|
xhr.setRequestHeader('Authorization', token)
|
|
377
416
|
this.error = true
|
|
378
417
|
xhr.onreadystatechange = () => {
|
|
@@ -530,6 +569,7 @@ export default {
|
|
|
530
569
|
.can {
|
|
531
570
|
padding: 10px;
|
|
532
571
|
height: 100%;
|
|
572
|
+
box-sizing: border-box;
|
|
533
573
|
}
|
|
534
574
|
.can-pop-but-cont{
|
|
535
575
|
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
|
-
|
|
135
|
-
|
|
136
|
-
|
|
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)
|