[bugfix] Picker:incorrect option height in some android devices (#1449)

[bugfix] Picker:incorrect option height in some android devices
This commit is contained in:
SnowZhangXl
2018-07-10 09:52:16 +08:00
committed by neverland
parent 8c7dc1e622
commit 75d0aecd1e
5 changed files with 349 additions and 342 deletions

View File

@@ -11,6 +11,7 @@
<ul :style="wrapperStyle">
<li
v-for="(option, index) in options"
:key="index"
v-html="getOptionText(option)"
class="van-ellipsis"
:class="b('item', {
@@ -18,6 +19,7 @@
selected: index === currentIndex
})"
@click="setIndex(index, true)"
:style="itemStyle"
/>
</ul>
</div>
@@ -96,6 +98,11 @@ export default create({
transform: `translate3d(0, ${this.offset + this.baseOffset}px, 0)`,
lineHeight: this.itemHeight + 'px'
};
},
itemStyle() {
return {
height: this.itemHeight + 'px'
};
}
},