zydx-plus 1.35.516 → 1.35.518

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.35.516",
3
+ "version": "1.35.518",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -217,7 +217,7 @@ export default {
217
217
  methods: {
218
218
  // 全屏
219
219
  fullScreen() {
220
- const myElement = document.getElementById(this.id);
220
+ const myElement = document.body;
221
221
  if (myElement.requestFullscreen) {
222
222
  myElement.requestFullscreen();
223
223
  } else if (myElement.mozRequestFullScreen) { // Firefox
@@ -355,28 +355,22 @@ export default {
355
355
  this.footIsMove = false;
356
356
  },
357
357
  enlarge() {
358
+ let clientWidth = window.innerWidth
358
359
  if(this.state) {
359
360
  this.exitFullscreen()
361
+ this.x = clientWidth / 2 - this.width / 2;
362
+ this.y = window.innerHeight / 2 - this.height / 2;
363
+ this.footDownOffset = this.height;
364
+ this.footRightOffset = this.width;
360
365
  }else {
361
366
  this.fullScreen()
367
+ setTimeout(() => {
368
+ this.x = 0;
369
+ this.y = 0;
370
+ this.footDownOffset = window.innerHeight;
371
+ this.footRightOffset = clientWidth;
372
+ },100)
362
373
  }
363
- // this.state = false
364
- // let clientWidth = document.documentElement.clientWidth;
365
- // let clientHeight = document.documentElement.clientHeight;
366
- // if (clientWidth === this.footRightOffset && clientHeight === this.footDownOffset) {
367
- // this.x = clientWidth / 2 - this.width / 2;
368
- // this.y = clientHeight / 2 - this.height / 2;
369
- // this.footDownOffset = this.height;
370
- // this.footRightOffset = this.width;
371
- // this.state = false
372
- //
373
- // } else {
374
- // this.x = 0;
375
- // this.y = 0;
376
- // this.footDownOffset = clientHeight;
377
- // this.footRightOffset = clientWidth;
378
- // this.state = true
379
- // }
380
374
  this.$emit('updateDrag', {
381
375
  width: this.footRightOffset,
382
376
  height: this.footDownOffset - ((this.dragTextShow)?60:30),
@@ -388,11 +382,13 @@ export default {
388
382
  minimizeTap() {
389
383
  this.isMove = false
390
384
  this.footIsMove = false
385
+ this.exitFullscreen()
391
386
  this.$emit('minimize');
392
387
  },
393
388
  close() {
394
389
  this.isMove = false
395
390
  this.footIsMove = false
391
+ this.exitFullscreen()
396
392
  this.$emit('close');
397
393
  },
398
394
  selectedDrag(){
@@ -225,7 +225,7 @@ export default {
225
225
  methods: {
226
226
  // 全屏
227
227
  fullScreen() {
228
- const myElement = document.getElementById(this.id);
228
+ const myElement = document.body;
229
229
  if (myElement.requestFullscreen) {
230
230
  myElement.requestFullscreen();
231
231
  } else if (myElement.mozRequestFullScreen) { // Firefox
@@ -361,27 +361,22 @@ export default {
361
361
  this.footIsMove = false;
362
362
  },
363
363
  enlarge() {
364
+ let clientWidth = window.innerWidth
364
365
  if(this.state) {
365
366
  this.exitFullscreen()
367
+ this.x = clientWidth / 2 - this.width / 2;
368
+ this.y = window.innerHeight / 2 - this.height / 2;
369
+ this.footDownOffset = this.height;
370
+ this.footRightOffset = this.width;
366
371
  }else {
367
372
  this.fullScreen()
373
+ setTimeout(() => {
374
+ this.x = 0;
375
+ this.y = 0;
376
+ this.footDownOffset = window.innerHeight;
377
+ this.footRightOffset = clientWidth;
378
+ },100)
368
379
  }
369
- // this.state = false
370
- // let clientWidth = document.documentElement.clientWidth;
371
- // let clientHeight = document.documentElement.clientHeight;
372
- // if (clientWidth === this.footRightOffset && clientHeight === this.footDownOffset) {
373
- // this.x = clientWidth / 2 - this.width / 2;
374
- // this.y = clientHeight / 2 - this.height / 2;
375
- // this.footDownOffset = this.height;
376
- // this.footRightOffset = this.width;
377
- // this.state = false
378
- // } else {
379
- // this.x = 0;
380
- // this.y = 0;
381
- // this.footDownOffset = clientHeight;
382
- // this.footRightOffset = clientWidth;
383
- // this.state = true
384
- // }
385
380
  this.$emit('updateDrag', {
386
381
  width: this.footRightOffset,
387
382
  height: this.footDownOffset - ((this.dragTextShow)?60:30),
@@ -393,11 +388,13 @@ export default {
393
388
  minimizeTap() {
394
389
  this.isMove = false
395
390
  this.footIsMove = false
391
+ this.exitFullscreen()
396
392
  this.$emit('minimize');
397
393
  },
398
394
  close() {
399
395
  this.isMove = false
400
396
  this.footIsMove = false
397
+ this.exitFullscreen()
401
398
  this.$emit('close');
402
399
  },
403
400
  selectedDrag(){
@@ -314,14 +314,14 @@ export default {
314
314
  // 清屏
315
315
  if (this.toolId === 'clear') {
316
316
  this.$refs.sketchpad.clear()
317
- setTimeout(() => { // 解决清屏篡位的问题
318
- this.width = this.width2 - 0.02
319
- this.height = this.height2 - 0.02
320
- setTimeout(() => {
321
- this.width2 = this.width
322
- this.height2 = this.height
323
- },10)
324
- },10)
317
+ // setTimeout(() => { // 解决清屏篡位的问题
318
+ // this.width = this.width2 - 0.02
319
+ // this.height = this.height2 - 0.02
320
+ // setTimeout(() => {
321
+ // this.width2 = this.width
322
+ // this.height2 = this.height
323
+ // },10)
324
+ // },10)
325
325
  }
326
326
  // 橡皮
327
327
  if (this.toolId === 'rubber') {
@@ -546,11 +546,13 @@ export default {
546
546
  }, 100)
547
547
  },
548
548
  mousemove(e) {
549
+ e.stopPropagation()
549
550
  if (!this.pressDown) return
550
551
  this.left = e.clientX - this.leftOffset;
551
552
  this.top = e.clientY - this.topOffset;
552
553
  },
553
554
  mouseup(e) {
555
+ e.stopPropagation()
554
556
  clearInterval(timer)
555
557
  if (!this.pressDown) {
556
558
  stayTime = 0
package/src/index.js CHANGED
@@ -89,7 +89,7 @@ function install(app) {
89
89
  }
90
90
 
91
91
  export default {
92
- version: '1.35.516',
92
+ version: '1.35.518',
93
93
  install,
94
94
  Calendar,
95
95
  Message,