@lemon-fe/mini-app 0.1.9 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/AppContainer/index.js +2 -3
- package/es/global.d.ts +2 -0
- package/es/global.js +3 -1
- package/package.json +1 -1
|
@@ -92,8 +92,6 @@ function App(props) {
|
|
|
92
92
|
}, []);
|
|
93
93
|
var goBack = useCallback(function () {
|
|
94
94
|
setState(function (prev) {
|
|
95
|
-
var _window$ReactNativeWe;
|
|
96
|
-
|
|
97
95
|
var nextRoutes = _toConsumableArray(prev.routes);
|
|
98
96
|
|
|
99
97
|
if (nextRoutes.length > 1) {
|
|
@@ -101,9 +99,10 @@ function App(props) {
|
|
|
101
99
|
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
102
100
|
routes: nextRoutes
|
|
103
101
|
});
|
|
102
|
+
} else {
|
|
103
|
+
mini.exit();
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
(_window$ReactNativeWe = window.ReactNativeWebView) === null || _window$ReactNativeWe === void 0 ? void 0 : _window$ReactNativeWe.postMessage(GO_BACK);
|
|
107
106
|
return prev;
|
|
108
107
|
});
|
|
109
108
|
}, []);
|
package/es/global.d.ts
CHANGED
package/es/global.js
CHANGED
|
@@ -12,7 +12,9 @@ export var mini = {
|
|
|
12
12
|
};
|
|
13
13
|
},
|
|
14
14
|
addListener: function addListener() {},
|
|
15
|
-
getExtraPayload: function getExtraPayload() {}
|
|
15
|
+
getExtraPayload: function getExtraPayload() {},
|
|
16
|
+
scanCode: function scanCode() {},
|
|
17
|
+
exit: function exit() {}
|
|
16
18
|
};
|
|
17
19
|
export function createApp(render) {
|
|
18
20
|
var count = 0;
|