0.0.5 • Published 7 years ago

wox-weapp-mixin v0.0.5

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

Mixin image

小程序 mixin for Page

Data Format

{
  data: {
    // any attribute
  },
  methods: {
    // any function
  }
}

Usage

  • page/index/index.js
import Mixin from 'wox-weapp-mixin';
import simpleMixin from '../mixins/simple-mixin';

Page(Mixin({
  data: {
    destination: 'london'
  },
  mixins: [simpleMixin]
  onLoad: function() {
    ...
  },
  onTabsClick: function(e) {
    ...
  }
}));
  • mixins/simple-mixin.js
module.exports = {
  data: {
    skinType: 'simple'
  },
  methods: {
    onHotPageScroll: function(e) {
      ...
    }
  }
};
0.0.5

7 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago