12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <template>
- <view slot="refresher" class="refresh-box">
- <image v-if="state == 2" class="refresh-icon" src="https://web-ext-storage.dcloud.net.cn/hello-uni-app-x/refresh-box-run.gif" mode="widthFix"></image>
- <text class="tip-text">{{text[state]}}</text>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- text: ['继续下拉执行刷新', '释放立即刷新', '刷新中', ""]
- }
- },
- props: {
- state: {
- type: Number,
- default: 0
- }
- }
- }
- </script>
- <style>
- .refresh-box {
- justify-content: center;
- align-items: center;
- flex-direction: row;
- width: 100%;
- height: 30px;
- }
- .refresh-icon {
- width: 20px;
- height: 20px;
- margin: 5px;
- }
- .tip-text {
- color: #888;
- font-size: 12px;
- }
- </style>
|