UNPKG

@ray-core/runtime

Version:

Ray 是一个全新的基于 React 的小程序开发框架

44 lines (43 loc) 1.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var App = /** @class */ (function () { function App(config) { this.config = config; } App.prototype.launch = function () { this.config.onLaunch(); }; App.prototype.show = function () { this.config.onShow(); }; App.prototype.hide = function () { this.config.onHide(); }; App.prototype.error = function () { this.config.onError('error'); }; App.prototype.themeChange = function () { this.config.onThemeChange(); }; App.prototype.unhandledRejection = function () { this.config.onUnhandledRejection(); }; App.prototype.pageNotFound = function () { this.config.onPageNotFound({ path: 'path', }); }; App.prototype.shareAppMessage = function () { this.config.onShareAppMessage({ from: 'menu', target: undefined, webViewUrl: 'https://www.alipay.com', }); }; return App; }()); function AppConstructor(config) { var app = new App(config); return app; } exports.default = AppConstructor;