nuke-switch
Advanced tools
Comparing version 1.0.1 to 1.0.2
# Changelog | ||
## 1.0.2 / 2017-11-15 | ||
* [[9920ff8](http://gitlab.alibaba-inc.com/nuke/switch/commit/9920ff8ce3fece4fe6c0c7a052a6c700b1b4be8b)] - `fix` class name should be display | ||
## 1.0.1 / 2017-11-08 | ||
@@ -5,0 +9,0 @@ |
@@ -35,14 +35,8 @@ 'use strict'; | ||
function Switch() { | ||
var _ref; | ||
var _temp, _this, _ret; | ||
function Switch(props) { | ||
_classCallCheck(this, Switch); | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
var _this = _possibleConstructorReturn(this, (Switch.__proto__ || Object.getPrototypeOf(Switch)).call(this, props)); | ||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Switch.__proto__ || Object.getPrototypeOf(Switch)).call.apply(_ref, [this].concat(args))), _this), _this.handleClick = function (e) { | ||
_this.handleClick = function (e) { | ||
if (_this.props.disabled) { | ||
@@ -53,3 +47,6 @@ return null; | ||
_this.props.onValueChange && _this.props.onValueChange.call(_this, newVal); | ||
}, _temp), _possibleConstructorReturn(_this, _ret); | ||
}; | ||
_this.displayName = 'Switch'; | ||
return _this; | ||
} | ||
@@ -73,4 +70,4 @@ | ||
disabled: disabled, | ||
onChange: function onChange(_ref2) { | ||
var value = _ref2.value; | ||
onChange: function onChange(_ref) { | ||
var value = _ref.value; | ||
return onValueChange(value); | ||
@@ -77,0 +74,0 @@ } |
{ | ||
"name": "nuke-switch", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "开关", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
27807
385