mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 11:17:41 +00:00
[bugfix] Picker:incorrect option height in some android devices (#1449)
[bugfix] Picker:incorrect option height in some android devices
This commit is contained in:
@@ -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'
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user