zydx-plus 1.35.528 → 1.35.529

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.528",
3
+ "version": "1.35.529",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -12,7 +12,8 @@
12
12
  </div>
13
13
  </div>
14
14
  <div :class="{'drag-cont2': fixedStart,'drag-conts': true}">
15
- <div class="drag-cont-slot">
15
+ <div class="drag-cont-slot" :class="{'zIndexSlot': footIsMove}">
16
+ <div class="zIndexSlot" v-if="footIsMove"></div>
16
17
  <slot name="content"></slot>
17
18
  </div>
18
19
  <div v-show="!fixedStart&&!autoHeight">
@@ -194,6 +195,10 @@ export default {
194
195
  this.y = this.top - scrollTop
195
196
  }
196
197
  }
198
+ document.addEventListener('fullscreenchange', this.handleFullScreenChange);
199
+ document.addEventListener('mozfullscreenchange', this.handleFullScreenChange); // Firefox
200
+ document.addEventListener('webkitfullscreenchange', this.handleFullScreenChange); // Chrome, Safari and Opera
201
+ document.addEventListener('msfullscreenchange', this.handleFullScreenChange); // IE/Edge
197
202
  // 监听窗口变化
198
203
  window.addEventListener('resize', () => {
199
204
  const wid = document.getElementById('app').offsetWidth
@@ -218,6 +223,24 @@ export default {
218
223
  },
219
224
  emits: ['dragStatus', 'close', 'enlarge','updateDrag','minimize','dragMouseup'],
220
225
  methods: {
226
+ handleFullScreenChange() {
227
+ if (!document.fullscreenElement) {
228
+ let clientWidth = window.innerWidth
229
+ this.x = clientWidth / 2 - this.width / 2;
230
+ this.y = (window.innerHeight / 2 - this.height / 2) - 80;
231
+ this.footDownOffset = this.height;
232
+ this.footRightOffset = this.width;
233
+ this.draggableState.draggable({enabled: true})
234
+ this.state = false
235
+ this.$emit('updateDrag', {
236
+ width: this.footRightOffset,
237
+ height: this.footDownOffset - ((this.dragTextShow)?60:30),
238
+ left: this.x,
239
+ top: this.y
240
+ })
241
+ this.$emit('enlarge', this.state)
242
+ }
243
+ },
221
244
  // 全屏
222
245
  fullScreen() {
223
246
  this.draggableState.draggable({enabled: false})
@@ -391,13 +414,13 @@ export default {
391
414
  minimizeTap() {
392
415
  this.isMove = false
393
416
  this.footIsMove = false
394
- this.exitFullscreen()
417
+ if(this.state) this.exitFullscreen()
395
418
  this.$emit('minimize');
396
419
  },
397
420
  close() {
398
421
  this.isMove = false
399
422
  this.footIsMove = false
400
- this.exitFullscreen()
423
+ if(this.state) this.exitFullscreen()
401
424
  this.$emit('close');
402
425
  },
403
426
  selectedDrag(){
@@ -582,4 +605,13 @@ export default {
582
605
  .zIndex10000{
583
606
  z-index: 10000;
584
607
  }
608
+ .zIndexSlot{
609
+ position: absolute;
610
+ top: 0;
611
+ right: 0;
612
+ left: 0;
613
+ bottom: 0;
614
+ z-index: 5;
615
+ background-color: rgba(255,255,255,0);
616
+ }
585
617
  </style>
@@ -14,6 +14,7 @@
14
14
  </div>
15
15
  <div :class="{'drag-cont2': fixedStart,'drag-conts': true}">
16
16
  <div class="drag-cont-slot">
17
+ <div class="zIndexSlot" v-if="footIsMove"></div>
17
18
  <slot name="content"></slot>
18
19
  </div>
19
20
  <div v-show="!fixedStart&&!autoHeight">
@@ -197,6 +198,11 @@ export default {
197
198
  this.y = this.top - scrollTop
198
199
  }
199
200
  }
201
+ document.addEventListener('fullscreenchange', this.handleFullScreenChange);
202
+ document.addEventListener('mozfullscreenchange', this.handleFullScreenChange); // Firefox
203
+ document.addEventListener('webkitfullscreenchange', this.handleFullScreenChange); // Chrome, Safari and Opera
204
+ document.addEventListener('msfullscreenchange', this.handleFullScreenChange); // IE/Edge
205
+
200
206
  // 监听窗口变化
201
207
  window.addEventListener('resize', () => {
202
208
  const wid = document.getElementById('app').offsetWidth
@@ -226,6 +232,24 @@ export default {
226
232
  },
227
233
  emits: ['dragStatus', 'close', 'enlarge','updateDrag','minimize','dragMouseup'],
228
234
  methods: {
235
+ handleFullScreenChange() {
236
+ if (!document.fullscreenElement) {
237
+ let clientWidth = window.innerWidth
238
+ this.x = clientWidth / 2 - this.width / 2;
239
+ this.y = (window.innerHeight / 2 - this.height / 2) - 80;
240
+ this.footDownOffset = this.height;
241
+ this.footRightOffset = this.width;
242
+ this.draggableState.draggable({enabled: true})
243
+ this.state = false
244
+ this.$emit('updateDrag', {
245
+ width: this.footRightOffset,
246
+ height: this.footDownOffset - ((this.dragTextShow)?60:30),
247
+ left: this.x,
248
+ top: this.y
249
+ })
250
+ this.$emit('enlarge', this.state)
251
+ }
252
+ },
229
253
  // 全屏
230
254
  fullScreen() {
231
255
  this.draggableState.draggable({enabled: false})
@@ -318,6 +342,9 @@ export default {
318
342
  if (that.y > that.clientHeight - that.footDownOffset + that.footDownOffset / 2) {
319
343
  that.y = that.clientHeight - that.footDownOffset + that.footDownOffset / 2
320
344
  }
345
+ },
346
+ onend (event) {
347
+ console.log('结束')
321
348
  }
322
349
  }
323
350
  })
@@ -397,13 +424,13 @@ export default {
397
424
  minimizeTap() {
398
425
  this.isMove = false
399
426
  this.footIsMove = false
400
- this.exitFullscreen()
427
+ if(this.state) this.exitFullscreen()
401
428
  this.$emit('minimize');
402
429
  },
403
430
  close() {
404
431
  this.isMove = false
405
432
  this.footIsMove = false
406
- this.exitFullscreen()
433
+ if(this.state) this.exitFullscreen()
407
434
  this.$emit('close');
408
435
  },
409
436
  selectedDrag(){
@@ -588,4 +615,13 @@ export default {
588
615
  .zIndex10000{
589
616
  z-index: 10000;
590
617
  }
618
+ .zIndexSlot{
619
+ position: absolute;
620
+ top: 0;
621
+ right: 0;
622
+ left: 0;
623
+ bottom: 0;
624
+ z-index: 5;
625
+ background-color: rgba(255,255,255,0);
626
+ }
591
627
  </style>
package/src/index.js CHANGED
@@ -89,7 +89,7 @@ function install(app) {
89
89
  }
90
90
 
91
91
  export default {
92
- version: '1.35.528',
92
+ version: '1.35.529',
93
93
  install,
94
94
  Calendar,
95
95
  Message,