@lemon-fe/mini-app 0.1.5 → 0.1.9
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.
|
@@ -30,6 +30,7 @@ import { parsePath } from '../../utils/path';
|
|
|
30
30
|
import { NavigationContext } from '../../context';
|
|
31
31
|
import Screen from '../Screen';
|
|
32
32
|
import { GO_BACK } from '../../constants';
|
|
33
|
+
import { mini } from '../../global';
|
|
33
34
|
import './index.css';
|
|
34
35
|
|
|
35
36
|
function App(props) {
|
|
@@ -107,9 +108,7 @@ function App(props) {
|
|
|
107
108
|
});
|
|
108
109
|
}, []);
|
|
109
110
|
useEffect(function () {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
return (_window$mini = window.mini) === null || _window$mini === void 0 ? void 0 : _window$mini.addListener(function (e) {
|
|
111
|
+
return mini.addListener(function (e) {
|
|
113
112
|
if (e === GO_BACK) {
|
|
114
113
|
goBack();
|
|
115
114
|
}
|
|
@@ -7,6 +7,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
7
7
|
import React, { createElement, memo, useMemo } from 'react';
|
|
8
8
|
import { ScreenContext } from '../../context';
|
|
9
9
|
import { useNavigation } from '../../hooks';
|
|
10
|
+
import { mini } from '../../global';
|
|
10
11
|
import './index.css';
|
|
11
12
|
|
|
12
13
|
function Screen(props) {
|
|
@@ -19,9 +20,7 @@ function Screen(props) {
|
|
|
19
20
|
};
|
|
20
21
|
}, [params]);
|
|
21
22
|
var statusBarHeight = useMemo(function () {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return (_window$mini = window.mini) === null || _window$mini === void 0 ? void 0 : _window$mini.getSystemInfoSync().statusBarHeight;
|
|
23
|
+
return mini.getSystemInfoSync().statusBarHeight;
|
|
25
24
|
}, []);
|
|
26
25
|
var navigation = useNavigation();
|
|
27
26
|
return /*#__PURE__*/React.createElement(ScreenContext.Provider, {
|
package/es/global.js
CHANGED