Skip to content

Commit

Permalink
feat(okam-core): add na attribute for app/page/component
Browse files Browse the repository at this point in the history
  • Loading branch information
wuhy committed Oct 22, 2018
1 parent f66e3bd commit 172d58b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion packages/okam-core/src/base/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@

'use strict';

import {global} from '../na/index';
import * as na from '../na/index';
import request from '../na/request';

export default {

/**
* The native env
*
* @type {Object}
*/
$na: na,

/**
* The global object
*
Expand Down
2 changes: 1 addition & 1 deletion packages/okam-core/src/base/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ export default {
*/
created() {
// cannot call setData
Object.assign(this, base);
this.$app = getCurrApp();
this.$api = getApis();
Object.assign(this, base);

this.$listener = new EventListener();

Expand Down

0 comments on commit 172d58b

Please sign in to comment.