Skip to content

Commit

Permalink
feat: movable-view 组件增加 animation 属性设置
Browse files Browse the repository at this point in the history
  • Loading branch information
zhetengbiji committed Jun 4, 2019
1 parent 6d66e01 commit 194b3a8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/view/components/movable-view/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ export default {
scaleValue: {
type: [Number, String],
default: 1
},
animation: {
type: [Boolean, String],
default: true
}
},
data () {
Expand Down Expand Up @@ -566,6 +570,10 @@ export default {
var limitXY = this._getLimitXY(x, y)
x = limitXY.x
y = limitXY.y
if (!this.animation) {
this._setTransform(x, y, scale, source, r, o)
return
}
this._STD._springX._solution = null
this._STD._springY._solution = null
this._STD._springScale._solution = null
Expand Down

0 comments on commit 194b3a8

Please sign in to comment.