nuke-switch
Advanced tools
Comparing version 2.2.26 to 2.2.28
@@ -6,2 +6,21 @@ # Change Log | ||
## [2.2.28](https://gitlab.alibaba-inc.com/nuke/switch/compare/v2.2.27...v2.2.28) (2018-10-09) | ||
**Note:** Version bump only for package nuke-switch | ||
## [2.2.27](https://gitlab.alibaba-inc.com/nuke/switch/compare/v2.2.26...v2.2.27) (2018-10-08) | ||
### Bug Fixes | ||
* add compat code to support weex 0.18 & qn ([7cd7c3e](https://gitlab.alibaba-inc.com/nuke/switch/commit/7cd7c3e)) | ||
<a name="2.2.26"></a> | ||
@@ -8,0 +27,0 @@ ## [2.2.26](https://gitlab.alibaba-inc.com/nuke/switch/compare/v2.2.25...v2.2.26) (2018-10-08) |
# Switch Demo | ||
* order: 1 | ||
- order: 1 | ||
@@ -5,0 +5,0 @@ --- |
@@ -79,5 +79,7 @@ 'use strict'; | ||
var isIOS = _nukeEnv.appInfo.platform.toLowerCase() === 'ios'; | ||
if (_nukeEnv.isWeex) { | ||
var nativeProps = { | ||
style: _extends({}, style), | ||
style: Object.assign({}, isIOS ? {} : { width: 95, height: 60 }, style), | ||
checked: value, | ||
@@ -91,3 +93,3 @@ disabled: disabled | ||
var styles = themeStyle; | ||
var isIOS = _nukeEnv.appInfo.platform.toLowerCase() === 'ios'; | ||
if (type) { | ||
@@ -94,0 +96,0 @@ isIOS = type === 'iOS'; |
{ | ||
"name": "nuke-switch", | ||
"version": "2.2.26", | ||
"version": "2.2.28", | ||
"description": "开关", | ||
@@ -41,11 +41,11 @@ "main": "lib/index", | ||
"dependencies": { | ||
"nuke-env": "^2.2.26", | ||
"nuke-helper": "^2.2.26", | ||
"nuke-theme-provider": "^2.2.26" | ||
"nuke-env": "^2.2.28", | ||
"nuke-helper": "^2.2.28", | ||
"nuke-theme-provider": "^2.2.28" | ||
}, | ||
"devDependencies": { | ||
"nuke-button": "^2.2.26", | ||
"nuke-page": "^2.2.26", | ||
"nuke-text": "^2.2.26", | ||
"nuke-view": "^2.2.26" | ||
"nuke-button": "^2.2.28", | ||
"nuke-page": "^2.2.28", | ||
"nuke-text": "^2.2.28", | ||
"nuke-view": "^2.2.28" | ||
}, | ||
@@ -56,3 +56,3 @@ "publishConfig": { | ||
"license": "Apache", | ||
"gitHead": "e829737c09a06edbe05e39d1a8c19197e621722e" | ||
"gitHead": "78501bab55f1574307f223c9121457189e0b2e1b" | ||
} |
@@ -5,3 +5,2 @@ /* @jsx createElement */ | ||
import { connectStyle } from 'nuke-theme-provider'; | ||
import stylesProvider from '../styles'; | ||
@@ -34,17 +33,8 @@ | ||
render() { | ||
const { | ||
style, | ||
type, | ||
value, | ||
disabled, | ||
onValueChange, | ||
themeStyle, | ||
...others | ||
} = this.props; | ||
const { style, type, value, disabled, onValueChange, themeStyle, ...others } = this.props; | ||
let isIOS = appInfo.platform.toLowerCase() === 'ios'; | ||
if (isWeex) { | ||
const nativeProps = { | ||
style: { | ||
...style, | ||
}, | ||
style: Object.assign({}, isIOS ? {} : { width: 95, height: 60 }, style), | ||
checked: value, | ||
@@ -54,9 +44,7 @@ disabled, | ||
return ( | ||
<switch {...others} {...nativeProps} onChange={this.changeHandler} /> | ||
); | ||
return <switch {...others} {...nativeProps} onChange={this.changeHandler} />; | ||
} | ||
const styles = themeStyle; | ||
let isIOS = appInfo.platform.toLowerCase() === 'ios'; | ||
if (type) { | ||
@@ -79,5 +67,3 @@ isIOS = type === 'iOS'; | ||
disabled ? styles.disabledWrapIOS : {}, | ||
disabled | ||
? styles[`disabled${value ? 'Checked' : 'UnChecked'}WrapIOS`] | ||
: {}, | ||
disabled ? styles[`disabled${value ? 'Checked' : 'UnChecked'}WrapIOS`] : {}, | ||
style | ||
@@ -84,0 +70,0 @@ ); |
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
53400
1038
Updatednuke-env@^2.2.28
Updatednuke-helper@^2.2.28
Updatednuke-theme-provider@^2.2.28