123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- const MescrollCompMixin = {
-
- onPageScroll(e) {
- this.handlePageScroll(e)
- },
- onReachBottom() {
- this.handleReachBottom()
- },
-
- onPullDownRefresh(){
- this.handlePullDownRefresh()
- },
-
- data() {
- return {
- mescroll: {
- onPageScroll: e=>{
- this.handlePageScroll(e)
- },
- onReachBottom: ()=>{
- this.handleReachBottom()
- },
- onPullDownRefresh: ()=>{
- this.handlePullDownRefresh()
- }
- }
- }
- },
- methods:{
- handlePageScroll(e){
- let item = this.$refs["mescrollItem"];
- if(item && item.mescroll) item.mescroll.onPageScroll(e);
- },
- handleReachBottom(){
- let item = this.$refs["mescrollItem"];
- if(item && item.mescroll) item.mescroll.onReachBottom();
- },
- handlePullDownRefresh(){
- let item = this.$refs["mescrollItem"];
- if(item && item.mescroll) item.mescroll.onPullDownRefresh();
- }
- }
- }
- export default MescrollCompMixin;
|