[bugfix] PullRefresh head overflow (#436)

This commit is contained in:
neverland
2017-12-14 16:32:34 +08:00
committed by GitHub
parent a024399fbe
commit 03bb3cc6ef
5 changed files with 77 additions and 47 deletions

View File

@@ -1,28 +1,30 @@
<template>
<div
class="van-pull-refresh"
:style="style"
@touchstart="onTouchStart"
@touchmove="onTouchMove"
@touchend="onTouchEnd"
@touchcancel="onTouchEnd"
>
<div class="van-pull-refresh__head">
<slot name="normal" v-if="status === 'normal'"></slot>
<slot name="pulling" v-if="status === 'pulling'">
<span class="van-pull-refresh__text">{{ pullingText || $t('pullingText') }}</span>
</slot>
<slot name="loosing" v-if="status === 'loosing'">
<span class="van-pull-refresh__text">{{ loosingText || $t('loosingText') }}</span>
</slot>
<slot name="loading" v-if="status === 'loading'">
<div class="van-pull-refresh__loading">
<loading />
<span>{{ loadingText || $t('loadingText') }}</span>
</div>
</slot>
<div class="van-pull-refresh">
<div
class="van-pull-refresh__track"
:style="style"
@touchstart="onTouchStart"
@touchmove="onTouchMove"
@touchend="onTouchEnd"
@touchcancel="onTouchEnd"
>
<div class="van-pull-refresh__head">
<slot name="normal" v-if="status === 'normal'"></slot>
<slot name="pulling" v-if="status === 'pulling'">
<span class="van-pull-refresh__text">{{ pullingText || $t('pullingText') }}</span>
</slot>
<slot name="loosing" v-if="status === 'loosing'">
<span class="van-pull-refresh__text">{{ loosingText || $t('loosingText') }}</span>
</slot>
<slot name="loading" v-if="status === 'loading'">
<div class="van-pull-refresh__loading">
<loading />
<span>{{ loadingText || $t('loadingText') }}</span>
</div>
</slot>
</div>
<slot></slot>
</div>
<slot></slot>
</div>
</template>