zydx-plus 1.35.514 → 1.35.516

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.514",
3
+ "version": "1.35.516",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -215,6 +215,33 @@ export default {
215
215
  },
216
216
  emits: ['dragStatus', 'close', 'enlarge','updateDrag','minimize','dragMouseup'],
217
217
  methods: {
218
+ // 全屏
219
+ fullScreen() {
220
+ const myElement = document.getElementById(this.id);
221
+ if (myElement.requestFullscreen) {
222
+ myElement.requestFullscreen();
223
+ } else if (myElement.mozRequestFullScreen) { // Firefox
224
+ myElement.mozRequestFullScreen();
225
+ } else if (myElement.webkitRequestFullscreen) { // Chrome, Safari and Opera
226
+ myElement.webkitRequestFullscreen();
227
+ } else if (myElement.msRequestFullscreen) { // IE and Edge
228
+ myElement.msRequestFullscreen();
229
+ }
230
+ this.state = true
231
+ },
232
+ // 退出全屏
233
+ exitFullscreen() {
234
+ if (document.exitFullscreen) {
235
+ document.exitFullscreen();
236
+ } else if (document.mozCancelFullScreen) {
237
+ document.mozCancelFullScreen();
238
+ } else if (document.webkitExitFullscreen) {
239
+ document.webkitExitFullscreen();
240
+ } else if (document.msExitFullscreen) {
241
+ document.msExitFullscreen();
242
+ }
243
+ this.state = false
244
+ },
218
245
  dragTap() {
219
246
  let pop = JSON.parse(sessionStorage.getItem('pop'))
220
247
  for(let i = 0; i< pop.length; i++) {
@@ -328,22 +355,28 @@ export default {
328
355
  this.footIsMove = false;
329
356
  },
330
357
  enlarge() {
331
- this.state = false
332
- let clientWidth = document.documentElement.clientWidth;
333
- let clientHeight = document.documentElement.clientHeight;
334
- if (clientWidth === this.footRightOffset && clientHeight === this.footDownOffset) {
335
- this.x = clientWidth / 2 - this.width / 2;
336
- this.y = clientHeight / 2 - this.height / 2;
337
- this.footDownOffset = this.height;
338
- this.footRightOffset = this.width;
339
- this.state = false
340
- } else {
341
- this.x = 0;
342
- this.y = 0;
343
- this.footDownOffset = clientHeight;
344
- this.footRightOffset = clientWidth;
345
- this.state = true
358
+ if(this.state) {
359
+ this.exitFullscreen()
360
+ }else {
361
+ this.fullScreen()
346
362
  }
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
+ // }
347
380
  this.$emit('updateDrag', {
348
381
  width: this.footRightOffset,
349
382
  height: this.footDownOffset - ((this.dragTextShow)?60:30),
@@ -223,6 +223,33 @@ export default {
223
223
  },
224
224
  emits: ['dragStatus', 'close', 'enlarge','updateDrag','minimize','dragMouseup'],
225
225
  methods: {
226
+ // 全屏
227
+ fullScreen() {
228
+ const myElement = document.getElementById(this.id);
229
+ if (myElement.requestFullscreen) {
230
+ myElement.requestFullscreen();
231
+ } else if (myElement.mozRequestFullScreen) { // Firefox
232
+ myElement.mozRequestFullScreen();
233
+ } else if (myElement.webkitRequestFullscreen) { // Chrome, Safari and Opera
234
+ myElement.webkitRequestFullscreen();
235
+ } else if (myElement.msRequestFullscreen) { // IE and Edge
236
+ myElement.msRequestFullscreen();
237
+ }
238
+ this.state = true
239
+ },
240
+ // 退出全屏
241
+ exitFullscreen() {
242
+ if (document.exitFullscreen) {
243
+ document.exitFullscreen();
244
+ } else if (document.mozCancelFullScreen) {
245
+ document.mozCancelFullScreen();
246
+ } else if (document.webkitExitFullscreen) {
247
+ document.webkitExitFullscreen();
248
+ } else if (document.msExitFullscreen) {
249
+ document.msExitFullscreen();
250
+ }
251
+ this.state = false
252
+ },
226
253
  dragTap() {
227
254
  if(this.zIndex > 0) return
228
255
  let pop = JSON.parse(sessionStorage.getItem('pop'))
@@ -334,22 +361,27 @@ export default {
334
361
  this.footIsMove = false;
335
362
  },
336
363
  enlarge() {
337
- this.state = false
338
- let clientWidth = document.documentElement.clientWidth;
339
- let clientHeight = document.documentElement.clientHeight;
340
- if (clientWidth === this.footRightOffset && clientHeight === this.footDownOffset) {
341
- this.x = clientWidth / 2 - this.width / 2;
342
- this.y = clientHeight / 2 - this.height / 2;
343
- this.footDownOffset = this.height;
344
- this.footRightOffset = this.width;
345
- this.state = false
346
- } else {
347
- this.x = 0;
348
- this.y = 0;
349
- this.footDownOffset = clientHeight;
350
- this.footRightOffset = clientWidth;
351
- this.state = true
364
+ if(this.state) {
365
+ this.exitFullscreen()
366
+ }else {
367
+ this.fullScreen()
352
368
  }
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
+ // }
353
385
  this.$emit('updateDrag', {
354
386
  width: this.footRightOffset,
355
387
  height: this.footDownOffset - ((this.dragTextShow)?60:30),
@@ -185,7 +185,7 @@ export default {
185
185
  left: 50%;
186
186
  z-index: 10;
187
187
  transform: translateX(-50%);
188
- height: 40px;
188
+ height: 20px;
189
189
  text-align: center;
190
190
  background-color: rgba(0,0,0,0.5);
191
191
  color: #fff;
package/src/index.js CHANGED
@@ -89,7 +89,7 @@ function install(app) {
89
89
  }
90
90
 
91
91
  export default {
92
- version: '1.35.514',
92
+ version: '1.35.516',
93
93
  install,
94
94
  Calendar,
95
95
  Message,