123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- const MescrollMoreItemMixin = {
- props:{
- i: Number,
- index: {
- type: Number,
- default(){
- return 0
- }
- }
- },
- data() {
- return {
- downOption:{
- auto:false
- },
- upOption:{
- auto:false
- },
- isInit: false
- }
- },
- watch:{
-
- index(val){
- if (this.i === val && !this.isInit) {
- this.isInit = true;
- this.mescroll && this.mescroll.triggerDownScroll();
- }
- }
- },
- methods: {
-
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- this.mescrollInitByRef && this.mescrollInitByRef();
-
- if(this.i === this.index){
- this.isInit = true;
- this.mescroll.triggerDownScroll();
- }
- },
- }
- }
- export default MescrollMoreItemMixin;
|