okam-core
Version:
The extension for small program framework
28 lines (23 loc) • 651 B
JavaScript
/**
* @file Make the store observable
* Notice: this plugin should used after the observable plugin if using
* computed property
* @author liujiaor@gmail.com
*/
;
import redux from '../index';
const rawCreated = redux.component.created;
export default {
component: Object.assign({}, redux.component, {
onInit() {
rawCreated.call(this);
},
created() {
// Compatible with the case that OnInit is not supported in the lower version
if (!this.$isSupportOninit) {
rawCreated.call(this);
}
}
}),
page: redux.page
};