|
可以,nanachi里面就模拟了
- onCreate: function () {
- if (this.$data && typeof global === 'object') {
- var ref = Object.getPrototypeOf(global) || global;
-
- var _this = this;
-
- this.globalData = this.$def.globalData;
-
- ref.getApp = function () {
- return _this;
- };
- }
- console.log('App launched');
- },
复制代码
娜娜奇是一个基于React的多端转译框架,搞定了众多兼容问题 https://rubylouvre.github.io/nanachi/ |
|