nuke-theme-provider
Advanced tools
Comparing version 1.0.7 to 1.0.8
# Changelog | ||
## 1.0.8 / 2018-03-14 | ||
* [[1a06c27](http://gitlab.alibaba-inc.com/nuke/theme-provider/commit/1a06c272009d1cfc136a62f70342ca7a9cef6f5b)] - `fix` add componentwillrecieveprops | ||
## 1.0.7 / 2017-12-15 | ||
@@ -5,0 +9,0 @@ |
@@ -119,4 +119,2 @@ 'use strict'; | ||
var theme = getTheme(context); | ||
var testStyle = _this.getStyleFromKlsName(props.klassName); | ||
// const themeStyle = theme.getComponentRelavantStyle(this.displayName); | ||
_this.displayName = componentDisplayName; | ||
@@ -188,12 +186,9 @@ var componentStyle = componentStyleProvider(theme.themeStyle); | ||
value: function componentWillReceiveProps(nextProps, nextContext) { | ||
// const styleNames = this.getStyleNames(nextProps); | ||
// const style = nextProps.style; | ||
// if (this.shouldRebuildStyle(nextProps, nextContext, styleNames)) { | ||
// const finalStyle = this.getFinalStyle(nextProps, nextContext, style, styleNames); | ||
// this.setState({ | ||
// style: finalStyle, | ||
// // childrenStyle: resolvedStyle.childrenStyle, | ||
// styleNames, | ||
// }); | ||
// } | ||
var theme = getTheme(nextContext); | ||
var componentStyle = componentStyleProvider(theme.themeStyle); | ||
var style = nextProps.style; | ||
var finalStyle = this.getFinalStyle(componentStyle, nextContext, style); | ||
this.setState({ | ||
style: finalStyle | ||
}); | ||
} | ||
@@ -229,9 +224,2 @@ }, { | ||
value: function render() { | ||
// console.log('themeCache', themeCache); | ||
// if(componentStyleName == 'NativeBase.Text') { | ||
// console.log(this.state.style); | ||
// console.log(themeCache); | ||
// } | ||
var _state = this.state, | ||
@@ -238,0 +226,0 @@ addedProps = _state.addedProps, |
{ | ||
"name": "nuke-theme-provider", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "主题换肤", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
26915
466