zydx-plus 1.34.458 → 1.34.460
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
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
<div class="drag-cont-slot">
|
|
20
20
|
<slot name="content"></slot>
|
|
21
21
|
</div>
|
|
22
|
-
<div v-show="!fixedStart">
|
|
23
|
-
<i class="drag-down"
|
|
22
|
+
<div v-show="!fixedStart&&!autoHeight">
|
|
23
|
+
<i class="drag-down" v-if="dragStatus" @mousedown.stop="footDown($event,'d')" @mouseup.stop="footUp"></i>
|
|
24
24
|
<i class="drag-in" v-if="dragStatus" @mousedown.stop="footDown($event,'in')" @mouseup.stop="footUp"></i>
|
|
25
25
|
<i class="drag-right" v-if="dragStatus" @mousedown.stop="footDown($event,'r')" @mouseup.stop="footUp"></i>
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
|
-
<div class="down-text" v-if="dragStatus&&dragTextShow&&!fixedStart">
|
|
28
|
+
<div class="down-text" v-if="dragStatus&&dragTextShow&&!fixedStart&&!autoHeight">
|
|
29
29
|
<div class="down-text-cont">
|
|
30
30
|
<slot name="down"></slot>
|
|
31
31
|
<!-- <img-->
|
|
@@ -60,6 +60,10 @@ export default {
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
props: {
|
|
63
|
+
isInitShowBottomRight: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false
|
|
66
|
+
},
|
|
63
67
|
width: {
|
|
64
68
|
type: Number,
|
|
65
69
|
default: 600
|
|
@@ -123,6 +127,10 @@ export default {
|
|
|
123
127
|
closeShow: {
|
|
124
128
|
type: Boolean,
|
|
125
129
|
default: true
|
|
130
|
+
},
|
|
131
|
+
autoHeight: {
|
|
132
|
+
type: Boolean,
|
|
133
|
+
default: false
|
|
126
134
|
}
|
|
127
135
|
},
|
|
128
136
|
beforeUnmount() {
|
|
@@ -132,12 +140,20 @@ export default {
|
|
|
132
140
|
width: {
|
|
133
141
|
handler: function (val) {
|
|
134
142
|
this.footRightOffset = val
|
|
143
|
+
if (this.isInitShowBottomRight) {
|
|
144
|
+
this.x = window.innerWidth - val
|
|
145
|
+
console.log('this.x', this.x)
|
|
146
|
+
}
|
|
135
147
|
},
|
|
136
148
|
immediate: true
|
|
137
149
|
},
|
|
138
150
|
height: {
|
|
139
151
|
handler: function (val) {
|
|
140
152
|
this.footDownOffset = val
|
|
153
|
+
if (this.isInitShowBottomRight) {
|
|
154
|
+
this.y = window.innerHeight - val
|
|
155
|
+
console.log('this.y', this.y)
|
|
156
|
+
}
|
|
141
157
|
},
|
|
142
158
|
immediate: true
|
|
143
159
|
},
|
|
@@ -152,10 +168,16 @@ export default {
|
|
|
152
168
|
},
|
|
153
169
|
mounted() {
|
|
154
170
|
this.id = Math.random().toString(36).substr(2);
|
|
171
|
+
this.init()
|
|
155
172
|
// 全局监听鼠标抬起事件
|
|
156
173
|
document.addEventListener('mouseup', this.mouseup);
|
|
157
174
|
document.addEventListener('mouseup', this.footUp);
|
|
158
|
-
this
|
|
175
|
+
this.$nextTick(() => {
|
|
176
|
+
this.$emit('updateDrag', {
|
|
177
|
+
width: this.footRightOffset,
|
|
178
|
+
height: this.footDownOffset - ((this.dragTextShow)?60:30)
|
|
179
|
+
})
|
|
180
|
+
})
|
|
159
181
|
let popArr = []
|
|
160
182
|
const pop = sessionStorage.getItem('pop')
|
|
161
183
|
popArr = (pop === null)? [] : JSON.parse(pop)
|
|
@@ -179,10 +201,14 @@ export default {
|
|
|
179
201
|
},
|
|
180
202
|
computed: {
|
|
181
203
|
position() {
|
|
182
|
-
|
|
204
|
+
if(this.autoHeight) {
|
|
205
|
+
return `top:${this.y}px;left:${this.x}px;width:${this.footRightOffset}px;min-height:${this.footDownOffset}px;`;
|
|
206
|
+
} else {
|
|
207
|
+
return `top:${this.y}px;left:${this.x}px;width:${this.footRightOffset}px;height:${this.footDownOffset}px;`;
|
|
208
|
+
}
|
|
183
209
|
},
|
|
184
210
|
},
|
|
185
|
-
emits: ['dragStatus', 'close', 'enlarge','updateDrag','minimize','dragMouseup'
|
|
211
|
+
emits: ['dragStatus', 'close', 'enlarge','updateDrag','minimize','dragMouseup'],
|
|
186
212
|
methods: {
|
|
187
213
|
dragTap() {
|
|
188
214
|
let pop = JSON.parse(sessionStorage.getItem('pop'))
|
|
@@ -211,20 +237,12 @@ export default {
|
|
|
211
237
|
const wid = document.getElementById('app').offsetWidth
|
|
212
238
|
this.x = this.left + (wid-this.initWidth)/2
|
|
213
239
|
this.y = this.top - document.documentElement.scrollTop
|
|
214
|
-
}else {
|
|
240
|
+
} else {
|
|
215
241
|
this.clientWidth = document.documentElement.clientWidth;
|
|
216
242
|
this.clientHeight = document.documentElement.clientHeight;
|
|
217
243
|
this.x = this.clientWidth / 2 - this.footRightOffset / 2;
|
|
218
244
|
this.y = this.clientHeight / 2 - this.footDownOffset / 2;
|
|
219
245
|
}
|
|
220
|
-
this.$nextTick(() => {
|
|
221
|
-
this.$emit('updateDrag', {
|
|
222
|
-
width: this.footRightOffset,
|
|
223
|
-
height: this.footDownOffset - ((this.dragTextShow)?60:30),
|
|
224
|
-
left: this.x,
|
|
225
|
-
top: this.y,
|
|
226
|
-
})
|
|
227
|
-
})
|
|
228
246
|
},
|
|
229
247
|
getWH(v) {
|
|
230
248
|
this.transAll = true
|
|
@@ -373,6 +391,7 @@ export default {
|
|
|
373
391
|
|
|
374
392
|
.drag-down {
|
|
375
393
|
position: absolute;
|
|
394
|
+
bottom: -50px;
|
|
376
395
|
right: 20px;
|
|
377
396
|
width: calc(100% - 20px);
|
|
378
397
|
height: 40px;
|
|
@@ -458,8 +477,8 @@ export default {
|
|
|
458
477
|
|
|
459
478
|
.drag-pop {
|
|
460
479
|
position: fixed;
|
|
461
|
-
top: 0;
|
|
462
|
-
left: 0;
|
|
480
|
+
/* top: 0;
|
|
481
|
+
left: 0; */
|
|
463
482
|
background-color: #fff;
|
|
464
483
|
border-radius: 3px;
|
|
465
484
|
z-index: 9999;
|