A tiny library for improving Wechat Mini programs development.:laughing:
use @wxa/cli
for better experiment.:smirk:
Detail documents: @wxa/doc💯
更完善的文档:@wxa/doc💯
- Mixins
- Promisify
- Decorator
- Router
- Eventbus
- Redux
import {wxa, App} from '@wxa/core';
@App
class Main{
//your logic here
}
// start up app
wxa.launchApp(Main);
import {wxa, Page} from '@wxa/core';
@Page
class Index{
//your logic here
}
// start up app
wxa.launchPage(Index);
support mixin object;
// common.js
export default {
data: {
email: 'genuifx@gmail.com',
},
onLoad(q) {
console.log('common mixin onLoad');
console.log(q);
console.log(this.data);
},
methods: {
bindViewTap() {
this.router.push('../logs/logs');
},
},
};
// page instance
@Page
class Index{
mixins = [common]
//your logic here
}