Skip to content

Commit

Permalink
feat: (infiniteloading) isShowBottomTips 控制底部加载提示
Browse files Browse the repository at this point in the history
  • Loading branch information
richard1015 committed Nov 10, 2020
1 parent 6aa8a9a commit d9bdb5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/packages/infiniteloading/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export default {
| is-loading | 是否加载中 | Boolean | false
| threshold | 距离底部多远加载 | Number | 200
| is-showMod | 是否展示懒加载模块内容,一般适用于选项卡切换 | Boolean | false
| is-show-bottom-tips | 是否展示底部加载提示 | Boolean | true
| use-window | 将滚动侦听器添加到 window 否则侦听组件的父节点 | Boolean | true
| use-capture | 是否使用捕获模式 true捕获 false冒泡 | Boolean | false
| unload-more-txt | 没有更多数据展示文案 | String | 哎呀,这里是底部了啦'
Expand Down
6 changes: 5 additions & 1 deletion src/packages/infiniteloading/infiniteloading.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="nut-infiniteloading" ref="scroller" @touchstart="touchStartHandle($event)" @touchmove="touchMoveHandle($event)">
<slot></slot>
<div class="load-more">
<div class="bottom-tips">
<div class="bottom-tips" v-if="isShowBottomTips">
<template v-if="isLoading"> <i class="loading-hint"></i><span class="loading-txt">加载中...</span> </template>
<span v-else-if="!hasMore" class="tips-txt">{{ unloadMoreTxt }}</span>
</div>
Expand Down Expand Up @@ -37,6 +37,10 @@ export default {
type: Boolean,
default: false,
},
isShowBottomTips: {
type: Boolean,
default: true,
},
unloadMoreTxt: {
type: String,
default: '哎呀,这里是底部了啦',
Expand Down

0 comments on commit d9bdb5b

Please sign in to comment.