123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- const MescrollMixin = {
-
-
-
-
- data() {
- return {
- mescroll: null
- }
- },
-
- onPullDownRefresh(){
- this.mescroll && this.mescroll.onPullDownRefresh();
- },
-
- onPageScroll(e) {
- this.mescroll && this.mescroll.onPageScroll(e);
- },
-
- onReachBottom() {
- this.mescroll && this.mescroll.onReachBottom();
- },
- methods: {
-
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- this.mescrollInitByRef();
- },
-
- mescrollInitByRef() {
- if(!this.mescroll || !this.mescroll.resetUpScroll){
- let mescrollRef = this.$refs.mescrollRef;
- if(mescrollRef) this.mescroll = mescrollRef.mescroll
- }
- },
-
- downCallback() {
-
- this.mescroll.resetUpScroll()
- },
-
- upCallback() {
-
- setTimeout(()=>{
- this.mescroll.endErr();
- }, 500)
- }
- },
- mounted() {
- this.mescrollInitByRef();
- }
-
- }
- export default MescrollMixin;
|