diff --git a/packages/okam-core/src/base/base.js b/packages/okam-core/src/base/base.js index a45bef42..af7c10f7 100644 --- a/packages/okam-core/src/base/base.js +++ b/packages/okam-core/src/base/base.js @@ -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 * diff --git a/packages/okam-core/src/base/component.js b/packages/okam-core/src/base/component.js index cfe8c5cb..a9e49451 100644 --- a/packages/okam-core/src/base/component.js +++ b/packages/okam-core/src/base/component.js @@ -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();