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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zydx-plus",
3
- "version": "1.35.510",
3
+ "version": "1.35.511",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -261,7 +261,9 @@ export default {
261
261
  that.dragTap()
262
262
  },
263
263
  move (event) {
264
- that.y = event.rect.top
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
- that.y = event.rect.top
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
package/src/index.js CHANGED
@@ -89,7 +89,7 @@ function install(app) {
89
89
  }
90
90
 
91
91
  export default {
92
- version: '1.35.510',
92
+ version: '1.35.511',
93
93
  install,
94
94
  Calendar,
95
95
  Message,