zydx-plus 1.35.526 → 1.35.527
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
|
@@ -11,16 +11,16 @@
|
|
|
11
11
|
<i v-if="closeShow" @click.stop="close"></i>
|
|
12
12
|
</div>
|
|
13
13
|
</div>
|
|
14
|
-
<div :class="{'drag-cont2': fixedStart,'drag-conts': true}"
|
|
14
|
+
<div :id="`resizable${id}`" :class="{'drag-cont2': fixedStart,'drag-conts': true}"
|
|
15
15
|
@mousemove.stop="footMove" @mouseleave.stop="footMove">
|
|
16
16
|
<div class="drag-cont-slot">
|
|
17
17
|
<slot name="content"></slot>
|
|
18
18
|
</div>
|
|
19
|
-
<div v-show="!fixedStart&&!autoHeight"
|
|
19
|
+
<!-- <div v-show="!fixedStart&&!autoHeight">-->
|
|
20
20
|
<!-- <i :class="{'drag-down2':!(dragStatus&&dragTextShow&&!fixedStart&&!autoHeight)}" class="drag-down" v-if="dragStatus" @mousedown.stop="footDown($event,'d')" @mouseup.stop="footUp"></i>-->
|
|
21
|
-
<i :class="{'drag-in2':!(dragStatus&&dragTextShow&&!fixedStart&&!autoHeight)}" class="drag-in" v-if="dragStatus" @mousedown.stop="footDown($event,'in')" @mouseup.stop="footUp"></i
|
|
21
|
+
<!-- <i :class="{'drag-in2':!(dragStatus&&dragTextShow&&!fixedStart&&!autoHeight)}" class="drag-in" v-if="dragStatus" @mousedown.stop="footDown($event,'in')" @mouseup.stop="footUp"></i>-->
|
|
22
22
|
<!-- <i :class="{'drag-right2':!(dragStatus&&dragTextShow&&!fixedStart&&!autoHeight)}" class="drag-right" v-if="dragStatus" @mousedown.stop="footDown($event,'r')" @mouseup.stop="footUp"></i>-->
|
|
23
|
-
</div
|
|
23
|
+
<!-- </div>-->
|
|
24
24
|
</div>
|
|
25
25
|
<!-- <div class="down-text" v-if="dragStatus&&dragTextShow&&!fixedStart&&!autoHeight">-->
|
|
26
26
|
<!-- <div class="down-text-cont">-->
|
|
@@ -55,7 +55,9 @@ export default {
|
|
|
55
55
|
clientHeight: 0,
|
|
56
56
|
transAll: false,
|
|
57
57
|
fixedStart: false,
|
|
58
|
-
initWidth: 1280
|
|
58
|
+
initWidth: 1280,
|
|
59
|
+
draggableState: null,
|
|
60
|
+
draggableState2: null,
|
|
59
61
|
}
|
|
60
62
|
},
|
|
61
63
|
props: {
|
|
@@ -152,7 +154,6 @@ export default {
|
|
|
152
154
|
this.footDownOffset = val
|
|
153
155
|
if (this.isInitShowBottomRight) {
|
|
154
156
|
this.y = window.innerHeight - val
|
|
155
|
-
console.log('this.y', this.y)
|
|
156
157
|
}
|
|
157
158
|
},
|
|
158
159
|
immediate: true
|
|
@@ -160,6 +161,7 @@ export default {
|
|
|
160
161
|
fixed: {
|
|
161
162
|
handler: function (val) {
|
|
162
163
|
this.fixedStart = val
|
|
164
|
+
if(!this.fixedStart) return
|
|
163
165
|
this.init()
|
|
164
166
|
},
|
|
165
167
|
immediate: true,
|
|
@@ -219,6 +221,8 @@ export default {
|
|
|
219
221
|
methods: {
|
|
220
222
|
// 全屏
|
|
221
223
|
fullScreen() {
|
|
224
|
+
this.draggableState.draggable({enabled: false})
|
|
225
|
+
this.draggableState2.resizable({enabled: false})
|
|
222
226
|
const myElement = document.body;
|
|
223
227
|
if (myElement.requestFullscreen) {
|
|
224
228
|
myElement.requestFullscreen();
|
|
@@ -233,6 +237,8 @@ export default {
|
|
|
233
237
|
},
|
|
234
238
|
// 退出全屏
|
|
235
239
|
exitFullscreen() {
|
|
240
|
+
this.draggableState.draggable({enabled: true})
|
|
241
|
+
this.draggableState2.resizable({enabled: true})
|
|
236
242
|
if (document.exitFullscreen) {
|
|
237
243
|
document.exitFullscreen();
|
|
238
244
|
} else if (document.mozCancelFullScreen) {
|
|
@@ -285,11 +291,11 @@ export default {
|
|
|
285
291
|
this.y=isNaN(this.y)?100:this.y
|
|
286
292
|
}
|
|
287
293
|
setTimeout(() => {
|
|
288
|
-
interact(`#draggable${that.id}`)
|
|
294
|
+
this.draggableState = interact(`#draggable${that.id}`)
|
|
295
|
+
this.draggableState2 = interact(`#resizable${that.id}`)
|
|
296
|
+
this.draggableState.draggable({
|
|
297
|
+
enabled: true,
|
|
289
298
|
listeners: {
|
|
290
|
-
start (event) {
|
|
291
|
-
that.dragTap()
|
|
292
|
-
},
|
|
293
299
|
move (event) {
|
|
294
300
|
// 获取滚动距离
|
|
295
301
|
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
@@ -310,6 +316,22 @@ export default {
|
|
|
310
316
|
}
|
|
311
317
|
}
|
|
312
318
|
})
|
|
319
|
+
this.draggableState2.resizable({
|
|
320
|
+
edges: { top: false, left: false, bottom: true, right: true },
|
|
321
|
+
enabled: true,
|
|
322
|
+
listeners: {
|
|
323
|
+
move: function (event) {
|
|
324
|
+
that.footRightOffset = event.rect.width
|
|
325
|
+
that.footDownOffset = event.rect.height + (that.dragTextShow?60:30)
|
|
326
|
+
that.$emit('updateDrag', {
|
|
327
|
+
width: that.footRightOffset,
|
|
328
|
+
height: that.footDownOffset - (that.dragTextShow?60:30),
|
|
329
|
+
left: that.x,
|
|
330
|
+
top: that.y
|
|
331
|
+
})
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
})
|
|
313
335
|
},0)
|
|
314
336
|
},
|
|
315
337
|
getWH(v) {
|
|
@@ -370,8 +392,8 @@ export default {
|
|
|
370
392
|
setTimeout(() => {
|
|
371
393
|
this.x = 0;
|
|
372
394
|
this.y = 0;
|
|
373
|
-
this.footDownOffset = window.outerHeight;
|
|
374
|
-
this.footRightOffset = window.outerWidth;
|
|
395
|
+
this.footDownOffset = window.outerHeight + 20;
|
|
396
|
+
this.footRightOffset = window.outerWidth + 20;
|
|
375
397
|
},100)
|
|
376
398
|
}
|
|
377
399
|
this.$emit('updateDrag', {
|
|
@@ -406,6 +428,8 @@ export default {
|
|
|
406
428
|
width: 100%;
|
|
407
429
|
height: 100%;
|
|
408
430
|
overflow: auto;
|
|
431
|
+
position: relative;
|
|
432
|
+
z-index: -1;
|
|
409
433
|
}
|
|
410
434
|
|
|
411
435
|
.drag-cont-slot::-webkit-scrollbar {
|
|
@@ -12,16 +12,15 @@
|
|
|
12
12
|
<i v-if="closeShow" @click.stop="close"></i>
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
|
-
<div :class="{'drag-cont2': fixedStart,'drag-conts': true}"
|
|
16
|
-
@mousemove.stop="footMove" @mouseleave.stop="footMove">
|
|
15
|
+
<div :id="`resizable${id}`" :class="{'drag-cont2': fixedStart,'drag-conts': true}">
|
|
17
16
|
<div class="drag-cont-slot">
|
|
18
17
|
<slot name="content"></slot>
|
|
19
18
|
</div>
|
|
20
|
-
<div v-show="!fixedStart&&!autoHeight"
|
|
21
|
-
|
|
22
|
-
<i :class="{'drag-in2':!(dragStatus&&dragTextShow&&!fixedStart&&!autoHeight)}" class="drag-in" v-if="dragStatus" @mousedown.stop="footDown($event,'in')" @mouseup.stop="footUp"></i
|
|
23
|
-
|
|
24
|
-
</div
|
|
19
|
+
<!-- <div v-show="!fixedStart&&!autoHeight">-->
|
|
20
|
+
<!-- <i :class="{'drag-down2':!(dragStatus&&dragTextShow&&!fixedStart&&!autoHeight)}" class="drag-down" v-if="dragStatus" @mousedown.stop="footDown($event,'d')" @mouseup.stop="footUp"></i>-->
|
|
21
|
+
<!-- <i :class="{'drag-in2':!(dragStatus&&dragTextShow&&!fixedStart&&!autoHeight)}" class="drag-in" v-if="dragStatus" @mousedown.stop="footDown($event,'in')" @mouseup.stop="footUp"></i>-->
|
|
22
|
+
<!-- <i :class="{'drag-right2':!(dragStatus&&dragTextShow&&!fixedStart&&!autoHeight)}" class="drag-right" v-if="dragStatus" @mousedown.stop="footDown($event,'r')" @mouseup.stop="footUp"></i>-->
|
|
23
|
+
<!-- </div>-->
|
|
25
24
|
</div>
|
|
26
25
|
<!-- <div class="down-text" v-if="dragStatus&&dragTextShow&&!fixedStart&&!autoHeight">-->
|
|
27
26
|
<!-- <div class="down-text-cont">-->
|
|
@@ -56,7 +55,9 @@ export default {
|
|
|
56
55
|
clientHeight: 0,
|
|
57
56
|
transAll: false,
|
|
58
57
|
fixedStart: false,
|
|
59
|
-
initWidth: 1280
|
|
58
|
+
initWidth: 1280,
|
|
59
|
+
draggableState: null,
|
|
60
|
+
draggableState2: null,
|
|
60
61
|
}
|
|
61
62
|
},
|
|
62
63
|
props: {
|
|
@@ -164,6 +165,7 @@ export default {
|
|
|
164
165
|
fixed: {
|
|
165
166
|
handler: function (val) {
|
|
166
167
|
this.fixedStart = val
|
|
168
|
+
if(!this.fixedStart) return
|
|
167
169
|
this.init()
|
|
168
170
|
},
|
|
169
171
|
immediate: true,
|
|
@@ -227,20 +229,24 @@ export default {
|
|
|
227
229
|
methods: {
|
|
228
230
|
// 全屏
|
|
229
231
|
fullScreen() {
|
|
232
|
+
this.draggableState.draggable({enabled: false})
|
|
233
|
+
this.draggableState2.resizable({enabled: false})
|
|
230
234
|
const myElement = document.body;
|
|
231
235
|
if (myElement.requestFullscreen) {
|
|
232
236
|
myElement.requestFullscreen();
|
|
233
|
-
} else if (myElement.mozRequestFullScreen) {
|
|
237
|
+
} else if (myElement.mozRequestFullScreen) {
|
|
234
238
|
myElement.mozRequestFullScreen();
|
|
235
|
-
} else if (myElement.webkitRequestFullscreen) {
|
|
239
|
+
} else if (myElement.webkitRequestFullscreen) {
|
|
236
240
|
myElement.webkitRequestFullscreen();
|
|
237
|
-
} else if (myElement.msRequestFullscreen) {
|
|
241
|
+
} else if (myElement.msRequestFullscreen) {
|
|
238
242
|
myElement.msRequestFullscreen();
|
|
239
243
|
}
|
|
240
244
|
this.state = true
|
|
241
245
|
},
|
|
242
246
|
// 退出全屏
|
|
243
247
|
exitFullscreen() {
|
|
248
|
+
this.draggableState.draggable({enabled: true})
|
|
249
|
+
this.draggableState2.resizable({enabled: true})
|
|
244
250
|
if (document.exitFullscreen) {
|
|
245
251
|
document.exitFullscreen();
|
|
246
252
|
} else if (document.mozCancelFullScreen) {
|
|
@@ -294,7 +300,10 @@ export default {
|
|
|
294
300
|
this.y=isNaN(this.y)?100:this.y
|
|
295
301
|
}
|
|
296
302
|
setTimeout(() => {
|
|
297
|
-
interact(`#draggable${that.id}`)
|
|
303
|
+
this.draggableState = interact(`#draggable${that.id}`)
|
|
304
|
+
this.draggableState2 = interact(`#resizable${that.id}`)
|
|
305
|
+
this.draggableState.draggable({
|
|
306
|
+
enabled: true,
|
|
298
307
|
listeners: {
|
|
299
308
|
move (event) {
|
|
300
309
|
// 获取滚动距离
|
|
@@ -316,6 +325,22 @@ export default {
|
|
|
316
325
|
}
|
|
317
326
|
}
|
|
318
327
|
})
|
|
328
|
+
this.draggableState2.resizable({
|
|
329
|
+
edges: { top: false, left: false, bottom: true, right: true },
|
|
330
|
+
enabled: true,
|
|
331
|
+
listeners: {
|
|
332
|
+
move: function (event) {
|
|
333
|
+
that.footRightOffset = event.rect.width
|
|
334
|
+
that.footDownOffset = event.rect.height + (that.dragTextShow?60:30)
|
|
335
|
+
that.$emit('updateDrag', {
|
|
336
|
+
width: that.footRightOffset,
|
|
337
|
+
height: that.footDownOffset - (that.dragTextShow?60:30),
|
|
338
|
+
left: that.x,
|
|
339
|
+
top: that.y
|
|
340
|
+
})
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
})
|
|
319
344
|
},0)
|
|
320
345
|
},
|
|
321
346
|
getWH(v) {
|
|
@@ -326,43 +351,6 @@ export default {
|
|
|
326
351
|
this.transAll = false
|
|
327
352
|
},300)
|
|
328
353
|
},
|
|
329
|
-
footDown(event, v) {
|
|
330
|
-
event.preventDefault()
|
|
331
|
-
this.direction = v
|
|
332
|
-
this.footIsMove = true;
|
|
333
|
-
this.dragTap()
|
|
334
|
-
},
|
|
335
|
-
footMove(event) {
|
|
336
|
-
if (this.state) return;
|
|
337
|
-
if (!this.footIsMove) return;
|
|
338
|
-
if (this.direction === 'd') {
|
|
339
|
-
this.footDownOffset = event.clientY - this.y;
|
|
340
|
-
} else if (this.direction === 'in') {
|
|
341
|
-
this.footDownOffset = event.clientY - this.y;
|
|
342
|
-
this.footRightOffset = event.clientX - this.x;
|
|
343
|
-
} else if (this.direction === 'r') {
|
|
344
|
-
this.footRightOffset = event.clientX - this.x;
|
|
345
|
-
}
|
|
346
|
-
if(this.footRightOffset < this.minWidth) {
|
|
347
|
-
this.footRightOffset = this.minWidth
|
|
348
|
-
}
|
|
349
|
-
if(this.footDownOffset < this.minHeight) {
|
|
350
|
-
this.footDownOffset = this.minHeight
|
|
351
|
-
}
|
|
352
|
-
this.$emit('updateDrag', {
|
|
353
|
-
width: this.footRightOffset,
|
|
354
|
-
height: this.footDownOffset - ((this.dragTextShow)?60:30),
|
|
355
|
-
left: this.x,
|
|
356
|
-
top: this.y
|
|
357
|
-
})
|
|
358
|
-
},
|
|
359
|
-
footUp() {
|
|
360
|
-
this.$emit('dragMouseup', {
|
|
361
|
-
width: this.footRightOffset,
|
|
362
|
-
height: this.footDownOffset - ((this.dragTextShow)?60:30)
|
|
363
|
-
})
|
|
364
|
-
this.footIsMove = false;
|
|
365
|
-
},
|
|
366
354
|
enlarge() {
|
|
367
355
|
let clientWidth = window.innerWidth
|
|
368
356
|
if(this.state) {
|
|
@@ -376,8 +364,8 @@ export default {
|
|
|
376
364
|
setTimeout(() => {
|
|
377
365
|
this.x = 0;
|
|
378
366
|
this.y = 0;
|
|
379
|
-
this.footDownOffset = window.outerHeight;
|
|
380
|
-
this.footRightOffset = window.outerWidth;
|
|
367
|
+
this.footDownOffset = window.outerHeight + 20;
|
|
368
|
+
this.footRightOffset = window.outerWidth + 20;
|
|
381
369
|
},100)
|
|
382
370
|
}
|
|
383
371
|
this.$emit('updateDrag', {
|
|
@@ -412,6 +400,8 @@ export default {
|
|
|
412
400
|
width: 100%;
|
|
413
401
|
height: 100%;
|
|
414
402
|
overflow: auto;
|
|
403
|
+
position: relative;
|
|
404
|
+
z-index: -1;
|
|
415
405
|
}
|
|
416
406
|
|
|
417
407
|
.drag-cont-slot::-webkit-scrollbar {
|