nuke-input
Advanced tools
Comparing version 1.0.26 to 1.0.27
@@ -65,6 +65,8 @@ # Input Demo | ||
</View> | ||
<View style={styles.demoBlock}> | ||
<Input floatPlaceholder={false} maxRows={5} maxLength={250} onInput={this.checkLength} renderCount={true} type="text" placeholder="milti-line input label" /> | ||
</View> | ||
<Page.Intro main="renderCount"></Page.Intro> | ||
<View style={styles.demoBlock}> | ||
<Input multiple maxRows={5} onInput={this.checkLength} renderCount={true} type="text" placeholder="milti-line input label" /> | ||
<Input multiple floatPlaceholder={false} maxRows={5} maxLength={250} onInput={this.checkLength} renderCount={true} type="text" placeholder="milti-line input label" /> | ||
</View> | ||
@@ -71,0 +73,0 @@ <Page.Intro main="always error"></Page.Intro> |
# Changelog | ||
## 1.0.27 / 2017-12-19 | ||
* [[744fde5](http://gitlab.alibaba-inc.com/nuke/input/commit/744fde5a80d1b3bd9475ba6342fca7f3d84ae4d2)] - `feat` fix style,ad maxline auto scroll for multiple | ||
## 1.0.26 / 2017-12-17 | ||
@@ -5,0 +9,0 @@ |
@@ -159,2 +159,4 @@ 'use strict'; | ||
paddingRight: 0, | ||
marginTop: Variables['md-input-margin-tb'], | ||
marginBottom: Variables['md-input-margin-tb'], | ||
zIndex: 3, | ||
@@ -206,5 +208,6 @@ backgroundColor: 'transparent', | ||
'multiple-count-wrap': { | ||
position: 'absolute', | ||
bottom: Variables['multiple-count-bottom'], | ||
right: Variables['multiple-count-right'], | ||
alignSelf: 'flex-end', | ||
// position: 'absolute', | ||
// bottom: Variables['multiple-count-bottom'], | ||
// right: Variables['multiple-count-right'], | ||
maxWidth: Variables['multiple-count-min-width'] | ||
@@ -232,2 +235,3 @@ // flexDirection: 'row', | ||
'md-multiple-count-wrap': { | ||
alignSelf: 'flex-end', | ||
// position: 'absolute', | ||
@@ -234,0 +238,0 @@ // bottom: Variables['multiple-count-bottom'], |
@@ -169,6 +169,9 @@ 'use strict'; | ||
value: function _webAdjustHeight(el) { | ||
var maxRows = this.props.maxRows; | ||
var outerHeight = parseInt(window.getComputedStyle(el).height, 10); | ||
var diff = outerHeight - el.clientHeight; | ||
var max = Math.min(this.minHeight * maxRows, el.scrollHeight + diff); | ||
el.style.height = 0; | ||
el.style.height = Math.max(this.minHeight, el.scrollHeight + diff) + 'px'; | ||
el.style.height = Math.max(this.minHeight, max) + 'px'; | ||
} | ||
@@ -175,0 +178,0 @@ }, { |
{ | ||
"name": "nuke-input", | ||
"version": "1.0.26", | ||
"version": "1.0.27", | ||
"description": "输入框", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
123417
1866