Comments (5)
能否提供具体的使用示例的代码
from vue-pull-to.
.house-list
pull-to(
class="scroll",
:top-load-method="refresh",
:bottom-load-method="searchMore",
:bottom-config="btmCfg"
)
ul: li(v-for="item in houses")
house-item(:house="item")
.split(v-show="houses.length > 1")
data () {
return {
beforeScroll: true,
pullup: true,
btnShow: true,
page: 1,
btmCfg: {
doneText: '加载成功'
}
}
},
watch: {
postEnd(bol) {
if (bol && this.loaded) {
this.loaded('done')
}
},
pageEnd (bol) {
if (bol && this.loaded) {
this.btmCfg.doneText = '白扯了,木有数据了...'
this.loaded('done')
}
}
},
methods: {
searchMore(loaded) {
this.loaded = loaded
if (this.hasMove) { return }
if (this.pageEnd) {
loaded('done')
return
}
this.page ++ // 上拉改变page,请求后面页码的数据
this.$store.dispatch('getHouses', {
pageNum: this.page,
pageSize: PAGE_SIZE,
province: this.currentCity.province,
city: this.currentCity.city
})
this.hasMove = false
},
refresh (loaded) {
loaded('done')
},
from vue-pull-to.
我发现了, webpack打包之后, 用express配置了本地服务,启动本地服务node prod.server.js ,项目运行起来 bottom-load-method和top-load-method事件也都没有触发,
from vue-pull-to.
你好已经修复了,npm更新一下最新的包
from vue-pull-to.
好的,非常感谢,^_^
from vue-pull-to.
Related Issues (20)
- 滚动列表定位 HOT 1
- ios滑动问题
- ios第一次滑动不了
- ios滑动问题 HOT 1
- 希望支持横向滚动
- 希望提供 pulldown() pullup() 方法,用于首次加载数据时呈现加载效果
- 希望不要把 下拉刷新的动画加到 scroll 元素上,这样在开发中会有很多麻烦,因为我必须刻意的让其他元素设置 z-index 来避免上拉加载的文字和图标不显示出来 HOT 4
- swiper内部嵌套pull组件,左右滑动切换被阻止 HOT 3
- 怎么修改下拉字体的颜色,急
- Great work
- 在小米5手机上checkBottomReached这个方法计算有误
- iOS12.1.4 6s 运行实例中的vue-pull-to-examptes 下拉刷新 在‘加载中’状态的是时候向上滑动 加载数据结束之后 刷新控件消失了。
- 下拉刷新时 SVG logo 不展示, 怎么解决
- 大佬,没有用vue脚手架,script引入vue-pull-to.js 怎么用啊 HOT 1
- 死活不触发方法,不知道为啥
- Bug when using Component in iOS HOT 3
- Support for scrolling using relative position mode
- Scrolling on mobile HOT 5
- it doesn't support nuxtjs HOT 2
- breaking with Vue3 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-pull-to.