fix(PullRefresh): track should be full of container (#5878)

This commit is contained in:
chenjiahan 2020-03-21 16:31:10 +08:00
parent c00b2937fb
commit afed270c14
3 changed files with 4 additions and 6 deletions

View File

@ -114,10 +114,7 @@ export default {
background-color: @white;
.van-pull-refresh {
&,
&__track {
height: calc(100vh - 50px);
}
height: calc(100vh - 50px);
}
.doge {

View File

@ -198,14 +198,14 @@ export default createComponent({
},
render() {
const style = {
const trackStyle = {
transitionDuration: `${this.duration}ms`,
transform: this.distance ? `translate3d(0,${this.distance}px, 0)` : '',
};
return (
<div class={bem()}>
<div ref="track" class={bem('track')} style={style}>
<div ref="track" class={bem('track')} style={trackStyle}>
<div class={bem('head')} style={this.headStyle}>
{this.genStatus()}
</div>

View File

@ -6,6 +6,7 @@
&__track {
position: relative;
height: 100%;
transition-property: transform;
}