zydx-plus 1.35.510 → 1.35.511
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
|
@@ -261,7 +261,9 @@ export default {
|
|
|
261
261
|
that.dragTap()
|
|
262
262
|
},
|
|
263
263
|
move (event) {
|
|
264
|
-
|
|
264
|
+
// 获取滚动距离
|
|
265
|
+
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
266
|
+
that.y = event.rect.top - scrollTop
|
|
265
267
|
that.x = event.rect.left
|
|
266
268
|
if (that.x < -that.footRightOffset / 2) {
|
|
267
269
|
that.x = -that.footRightOffset / 2
|
|
@@ -267,7 +267,9 @@ export default {
|
|
|
267
267
|
interact(`#draggable${that.id}`).draggable({
|
|
268
268
|
listeners: {
|
|
269
269
|
move (event) {
|
|
270
|
-
|
|
270
|
+
// 获取滚动距离
|
|
271
|
+
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
272
|
+
that.y = event.rect.top - scrollTop
|
|
271
273
|
that.x = event.rect.left
|
|
272
274
|
if (that.x < -that.footRightOffset / 2) {
|
|
273
275
|
that.x = -that.footRightOffset / 2
|