Skip to content

Commit

Permalink
upd: upd
Browse files Browse the repository at this point in the history
  • Loading branch information
zy19940510 committed Sep 2, 2020
1 parent 4ad472a commit a23dc85
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/packages/drag/drag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ export default {
this.screenWidth = domElem.clientWidth;
this.screenHeight = domElem.clientHeight;
el.style.zIndex = this.zIndex;
if (this.boundary.left && el.style.left === 0) {
if (this.boundary.left && !el.style.left) {
el.style.left = this.boundary.left + 'px';
} else if (this.boundary.right && el.style.right === 0) {
} else if (this.boundary.right && !el.style.right) {
el.style.right = this.boundary.right + 'px';
}
if (this.boundary.top && el.style.top === 0) {
if (this.boundary.top && !el.style.top) {
el.style.top = this.boundary.top + 'px';
} else if (this.boundary.bottom && el.style.bottom === 0) {
} else if (this.boundary.bottom && !el.style.bottom) {
el.style.bottom = this.boundary.bottom + 'px';
}
},
Expand Down

0 comments on commit a23dc85

Please sign in to comment.