nuke-transition
Advanced tools
Comparing version 0.1.10 to 0.1.11
# Changelog | ||
## 0.1.11 / 2017-08-08 | ||
* [[520fb95](http://gitlab.alibaba-inc.com/nuke/transition/commit/520fb951fd4c33fa003745e34cd63c0a0d0d055f)] - `fix` fix 默认值不存在 bug | ||
## 0.1.10 / 2017-07-31 | ||
@@ -5,0 +9,0 @@ |
@@ -10,12 +10,14 @@ 'use strict'; | ||
var defaultOptions = { | ||
timingFunction: 'ease-in-out', | ||
duration: 500, | ||
needLayout: false, | ||
delay: 0 | ||
}; | ||
function transition(node, styles, options, callback) { | ||
if (typeof options == 'function' || options == null) { | ||
callback = options; | ||
options = { | ||
timingFunction: 'ease', | ||
duration: 0, | ||
needLayout: false, | ||
delay: 0 | ||
}; | ||
} | ||
// 健壮性提升 | ||
options = Object.assign({}, defaultOptions, options); | ||
@@ -26,6 +28,6 @@ if (_nukeEnv.isWeex) { | ||
styles: styles, | ||
timingFunction: options.timingFunction || ease, | ||
delay: options.delay || 0, | ||
duration: options.duration || 500, | ||
needLayout: options.needLayout || false // 新增此 api | ||
timingFunction: options.timingFunction, | ||
delay: options.delay, | ||
duration: options.duration, | ||
needLayout: options.needLayout // 新增此 api | ||
}, callback || function () {}); | ||
@@ -32,0 +34,0 @@ } else if (_nukeEnv.isWeb) { |
{ | ||
"name": "nuke-transition", | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"description": "渐变", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18603
279