zydx-plus 1.35.580 → 1.35.582
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
|
@@ -212,9 +212,8 @@ export default {
|
|
|
212
212
|
// 监听窗口变化
|
|
213
213
|
window.addEventListener('resize', () => {
|
|
214
214
|
const wid = document.getElementById('app').offsetWidth
|
|
215
|
-
if(this.
|
|
216
|
-
|
|
217
|
-
this.x = this.left + (wid-this.initWidth)/2
|
|
215
|
+
if(this.state) {
|
|
216
|
+
this.footRightOffset = wid
|
|
218
217
|
}
|
|
219
218
|
});
|
|
220
219
|
document.onmouseup = () => {
|
|
@@ -235,19 +234,8 @@ export default {
|
|
|
235
234
|
methods: {
|
|
236
235
|
handleFullScreenChange() {
|
|
237
236
|
if (!document.fullscreenElement) {
|
|
238
|
-
|
|
239
|
-
this.x = clientWidth / 2 - this.width / 2;
|
|
240
|
-
this.y = (window.innerHeight / 2 - this.height / 2) - 80;
|
|
241
|
-
this.footDownOffset = this.height;
|
|
242
|
-
this.footRightOffset = this.width;
|
|
243
|
-
this.draggableState.draggable({enabled: true})
|
|
237
|
+
this.reducePop()
|
|
244
238
|
this.state = false
|
|
245
|
-
this.$emit('updateDrag', {
|
|
246
|
-
width: this.footRightOffset,
|
|
247
|
-
height: this.footDownOffset - ((this.dragTextShow)?60:30),
|
|
248
|
-
left: this.x,
|
|
249
|
-
top: this.y
|
|
250
|
-
})
|
|
251
239
|
this.$emit('enlarge', this.state)
|
|
252
240
|
}
|
|
253
241
|
},
|
|
@@ -324,6 +312,8 @@ export default {
|
|
|
324
312
|
this.y=isNaN(this.y)?100:this.y
|
|
325
313
|
}
|
|
326
314
|
}
|
|
315
|
+
if(this.x < 0) this.x = 0
|
|
316
|
+
if(this.y < 0) this.y = 0
|
|
327
317
|
setTimeout(() => {
|
|
328
318
|
this.draggableState = interact(`#draggable${that.id}`)
|
|
329
319
|
this.draggableState.draggable({
|
|
@@ -404,27 +394,33 @@ export default {
|
|
|
404
394
|
})
|
|
405
395
|
this.footIsMove = false;
|
|
406
396
|
},
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
this.
|
|
411
|
-
this.x = clientWidth / 2 - this.width / 2;
|
|
412
|
-
this.y = window.innerHeight / 2 - this.height / 2;
|
|
397
|
+
reducePop() {
|
|
398
|
+
setTimeout(() => {
|
|
399
|
+
this.x = document.documentElement.clientWidth / 2 - this.width / 2;
|
|
400
|
+
this.y = document.documentElement.clientHeight / 2 - this.height / 2;
|
|
413
401
|
this.footDownOffset = this.height;
|
|
414
402
|
this.footRightOffset = this.width;
|
|
403
|
+
if(this.x < 0) this.x = 0
|
|
404
|
+
if(this.y < 0) this.y = 0
|
|
415
405
|
this.$emit('updateDrag', {
|
|
416
406
|
width: this.footRightOffset,
|
|
417
407
|
height: this.footDownOffset - ((this.dragTextShow)?60:30),
|
|
418
408
|
left: this.x,
|
|
419
409
|
top: this.y
|
|
420
410
|
})
|
|
411
|
+
},100)
|
|
412
|
+
},
|
|
413
|
+
enlarge() {
|
|
414
|
+
if(this.state) {
|
|
415
|
+
this.exitFullscreen()
|
|
416
|
+
this.reducePop()
|
|
421
417
|
}else {
|
|
422
418
|
this.fullScreen()
|
|
423
419
|
setTimeout(() => {
|
|
424
420
|
this.x = 0;
|
|
425
421
|
this.y = 0;
|
|
426
|
-
this.footDownOffset =
|
|
427
|
-
this.footRightOffset =
|
|
422
|
+
this.footDownOffset = document.documentElement.clientHeight;
|
|
423
|
+
this.footRightOffset = document.documentElement.clientWidth;
|
|
428
424
|
this.$emit('updateDrag', {
|
|
429
425
|
width: this.footRightOffset,
|
|
430
426
|
height: this.footDownOffset - ((this.dragTextShow)?60:30),
|
|
@@ -212,9 +212,8 @@ export default {
|
|
|
212
212
|
// 监听窗口变化
|
|
213
213
|
window.addEventListener('resize', () => {
|
|
214
214
|
const wid = document.getElementById('app').offsetWidth
|
|
215
|
-
if(this.
|
|
216
|
-
|
|
217
|
-
this.x = this.left + (wid-this.initWidth)/2
|
|
215
|
+
if(this.state) {
|
|
216
|
+
this.footRightOffset = wid
|
|
218
217
|
}
|
|
219
218
|
});
|
|
220
219
|
setTimeout(() => {
|
|
@@ -242,19 +241,8 @@ export default {
|
|
|
242
241
|
methods: {
|
|
243
242
|
handleFullScreenChange() {
|
|
244
243
|
if (!document.fullscreenElement) {
|
|
245
|
-
|
|
246
|
-
this.x = clientWidth / 2 - this.width / 2;
|
|
247
|
-
this.y = (window.innerHeight / 2 - this.height / 2) - 80;
|
|
248
|
-
this.footDownOffset = this.height;
|
|
249
|
-
this.footRightOffset = this.width;
|
|
250
|
-
this.draggableState.draggable({enabled: true})
|
|
244
|
+
this.reducePop()
|
|
251
245
|
this.state = false
|
|
252
|
-
this.$emit('updateDrag', {
|
|
253
|
-
width: this.footRightOffset,
|
|
254
|
-
height: this.footDownOffset - ((this.dragTextShow)?60:30),
|
|
255
|
-
left: this.x,
|
|
256
|
-
top: this.y
|
|
257
|
-
})
|
|
258
246
|
this.$emit('enlarge', this.state)
|
|
259
247
|
}
|
|
260
248
|
},
|
|
@@ -317,6 +305,7 @@ export default {
|
|
|
317
305
|
},
|
|
318
306
|
init() {
|
|
319
307
|
let that = this
|
|
308
|
+
console.log(window.devicePixelRatio)
|
|
320
309
|
if(this.fixedStart) {
|
|
321
310
|
if(!this.isInitShowBottomRight) {
|
|
322
311
|
const wid = document.getElementById('app').offsetWidth
|
|
@@ -332,6 +321,8 @@ export default {
|
|
|
332
321
|
this.y=isNaN(this.y)?100:this.y
|
|
333
322
|
}
|
|
334
323
|
}
|
|
324
|
+
if(this.x < 0) this.x = 0
|
|
325
|
+
if(this.y < 0) this.y = 0
|
|
335
326
|
setTimeout(() => {
|
|
336
327
|
this.draggableState = interact(`#draggable${that.id}`)
|
|
337
328
|
this.draggableState.draggable({
|
|
@@ -413,27 +404,33 @@ export default {
|
|
|
413
404
|
})
|
|
414
405
|
this.footIsMove = false;
|
|
415
406
|
},
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
this.
|
|
420
|
-
this.x = clientWidth / 2 - this.width / 2;
|
|
421
|
-
this.y = window.innerHeight / 2 - this.height / 2;
|
|
407
|
+
reducePop() {
|
|
408
|
+
setTimeout(() => {
|
|
409
|
+
this.x = document.documentElement.clientWidth / 2 - this.width / 2;
|
|
410
|
+
this.y = document.documentElement.clientHeight / 2 - this.height / 2;
|
|
422
411
|
this.footDownOffset = this.height;
|
|
423
412
|
this.footRightOffset = this.width;
|
|
413
|
+
if(this.x < 0) this.x = 0
|
|
414
|
+
if(this.y < 0) this.y = 0
|
|
424
415
|
this.$emit('updateDrag', {
|
|
425
416
|
width: this.footRightOffset,
|
|
426
417
|
height: this.footDownOffset - ((this.dragTextShow)?60:30),
|
|
427
418
|
left: this.x,
|
|
428
419
|
top: this.y
|
|
429
420
|
})
|
|
421
|
+
},100)
|
|
422
|
+
},
|
|
423
|
+
enlarge() {
|
|
424
|
+
if(this.state) {
|
|
425
|
+
this.exitFullscreen()
|
|
426
|
+
this.reducePop()
|
|
430
427
|
}else {
|
|
431
428
|
this.fullScreen()
|
|
432
429
|
setTimeout(() => {
|
|
433
430
|
this.x = 0;
|
|
434
431
|
this.y = 0;
|
|
435
|
-
this.footDownOffset =
|
|
436
|
-
this.footRightOffset =
|
|
432
|
+
this.footDownOffset = document.documentElement.clientHeight;
|
|
433
|
+
this.footRightOffset = document.documentElement.clientWidth;
|
|
437
434
|
this.$emit('updateDrag', {
|
|
438
435
|
width: this.footRightOffset,
|
|
439
436
|
height: this.footDownOffset - ((this.dragTextShow)?60:30),
|
|
@@ -1731,10 +1731,10 @@ export default {
|
|
|
1731
1731
|
overflow: hidden;
|
|
1732
1732
|
}
|
|
1733
1733
|
.magnifier-head{
|
|
1734
|
-
height:
|
|
1734
|
+
height: 20px;
|
|
1735
1735
|
width: 100%;
|
|
1736
1736
|
background: #4B0C77;
|
|
1737
|
-
line-height:
|
|
1737
|
+
line-height: 20px;
|
|
1738
1738
|
display: flex;
|
|
1739
1739
|
justify-content: space-between;
|
|
1740
1740
|
padding: 0 5px;
|
|
@@ -1743,12 +1743,12 @@ export default {
|
|
|
1743
1743
|
.magnifier-icon>img{
|
|
1744
1744
|
width: 16px !important;
|
|
1745
1745
|
height: 16px !important;
|
|
1746
|
-
margin-left:
|
|
1746
|
+
margin-left: 6px;
|
|
1747
1747
|
position: relative;
|
|
1748
1748
|
top: 2px;
|
|
1749
1749
|
}
|
|
1750
1750
|
.magnifier-title{
|
|
1751
|
-
font-size:
|
|
1751
|
+
font-size: 12px;
|
|
1752
1752
|
color: #fff;
|
|
1753
1753
|
}
|
|
1754
1754
|
.magnifier-cont{
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<onClickOutSide :target="dropdown"
|
|
3
|
-
:handler="handler">
|
|
2
|
+
<onClickOutSide :target="dropdown" :handler="handler">
|
|
4
3
|
<div class="wrapper">
|
|
5
4
|
<div class="custom-select"
|
|
6
5
|
:class="{ 'readonly': readonly }">
|
|
@@ -8,12 +7,10 @@
|
|
|
8
7
|
:value="selected"
|
|
9
8
|
:placeholder="placeholder"
|
|
10
9
|
:readonly="true"
|
|
11
|
-
@click="toggleDropDown"
|
|
10
|
+
@click.stop="toggleDropDown"
|
|
12
11
|
class="select-css" />
|
|
13
12
|
|
|
14
|
-
<span class="custom-select-icons"
|
|
15
|
-
v-if="!readonly"
|
|
16
|
-
@click="toggleDropDown">
|
|
13
|
+
<span class="custom-select-icons" v-if="!readonly">
|
|
17
14
|
<svg xmlns="http://www.w3.org/2000/svg"
|
|
18
15
|
width="16"
|
|
19
16
|
height="16"
|
|
@@ -24,20 +21,21 @@
|
|
|
24
21
|
</g>
|
|
25
22
|
</svg>
|
|
26
23
|
</span>
|
|
27
|
-
<
|
|
24
|
+
<teleport to="body">
|
|
28
25
|
<template v-if="!readonly">
|
|
29
26
|
<template v-if="options.length">
|
|
30
27
|
<ul v-if="isOpen"
|
|
31
28
|
ref="dropdown"
|
|
29
|
+
:style="{position: 'fixed', 'z-index': '30000', left: x + 'px', top: y + 'px', width: width + 'px'}"
|
|
32
30
|
:class="{ 'custom-select-options': true, 'scroll': maxHeight > 0 }">
|
|
33
31
|
<li v-for="(option, idx) in options"
|
|
34
32
|
:key="idx"
|
|
35
33
|
:class="option.disable ? 'disable': ''"
|
|
36
|
-
@click="handleClick(option)">{{ option.label }}</li>
|
|
34
|
+
@click.stop="handleClick(option)">{{ option.label }}</li>
|
|
37
35
|
</ul>
|
|
38
36
|
</template>
|
|
39
37
|
</template>
|
|
40
|
-
</
|
|
38
|
+
</teleport>
|
|
41
39
|
</div>
|
|
42
40
|
</div>
|
|
43
41
|
</onClickOutSide>
|
|
@@ -85,17 +83,27 @@ export default defineComponent({
|
|
|
85
83
|
data() {
|
|
86
84
|
return {
|
|
87
85
|
isOpen: false,
|
|
88
|
-
selected: null
|
|
86
|
+
selected: null,
|
|
87
|
+
x: 0,
|
|
88
|
+
y: 0,
|
|
89
|
+
width: 0
|
|
89
90
|
}
|
|
90
91
|
},
|
|
91
92
|
methods: {
|
|
92
|
-
toggleDropDown: function () {
|
|
93
|
+
toggleDropDown: function (e) {
|
|
94
|
+
const { x, y, width, height } = e.target.getBoundingClientRect()
|
|
95
|
+
this.x = x
|
|
96
|
+
this.y = y + height
|
|
97
|
+
this.width = width
|
|
93
98
|
this.isOpen = !this.isOpen
|
|
99
|
+
if(this.isOpen) {
|
|
100
|
+
window.addEventListener('scroll', this.handler)
|
|
101
|
+
}else {
|
|
102
|
+
window.removeEventListener('scroll', this.handler)
|
|
103
|
+
}
|
|
94
104
|
},
|
|
95
105
|
handleClick: function (option) {
|
|
96
|
-
if(option.disable)
|
|
97
|
-
return
|
|
98
|
-
}
|
|
106
|
+
if(option.disable) return
|
|
99
107
|
this.$emit('update:value', option.value)
|
|
100
108
|
this.$emit('select', option)
|
|
101
109
|
this.selected = option.label
|
|
@@ -103,7 +111,9 @@ export default defineComponent({
|
|
|
103
111
|
},
|
|
104
112
|
handler: function () {
|
|
105
113
|
if (this.isOpen) {
|
|
106
|
-
|
|
114
|
+
setTimeout(() => {
|
|
115
|
+
this.isOpen = false
|
|
116
|
+
}, 200)
|
|
107
117
|
}
|
|
108
118
|
}
|
|
109
119
|
},
|
|
@@ -267,4 +277,34 @@ export default defineComponent({
|
|
|
267
277
|
.disable {
|
|
268
278
|
color: gray !important;
|
|
269
279
|
}
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
/* 适用于Webkit浏览器 */
|
|
283
|
+
::-webkit-scrollbar {
|
|
284
|
+
display: unset !important;
|
|
285
|
+
width: 2px !important;
|
|
286
|
+
border-radius: 5px;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
::-webkit-scrollbar-track {
|
|
290
|
+
display: unset !important;
|
|
291
|
+
background: #f1f1f1 !important;
|
|
292
|
+
width: 2px !important;
|
|
293
|
+
border-radius: 5px;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
::-webkit-scrollbar-thumb {
|
|
297
|
+
display: unset !important;
|
|
298
|
+
background: #888 !important;
|
|
299
|
+
width: 2px !important;
|
|
300
|
+
border-radius: 5px;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
::-webkit-scrollbar-thumb:hover {
|
|
304
|
+
display: unset !important;
|
|
305
|
+
background: #555 !important;
|
|
306
|
+
width: 2px !important;
|
|
307
|
+
border-radius: 5px;
|
|
308
|
+
}
|
|
309
|
+
|
|
270
310
|
</style>
|