0.0.5 • Published 6 years ago

wox-weapp-mixin v0.0.5

Weekly downloads
1
License
MIT
Repository
-
Last release
6 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

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago