@gm-mobile/mp 3.9.3-beta.21 → 3.9.3-beta.25
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gm-mobile/mp",
|
|
3
|
-
"version": "3.9.3-beta.
|
|
3
|
+
"version": "3.9.3-beta.25",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "liyatang <liyatang@qq.com>",
|
|
6
6
|
"homepage": "https://github.com/gmfe/gm-mobile#readme",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"url": "https://github.com/gmfe/gm-mobile/issues"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@gm-mobile/c-react": "^3.9.3-beta.
|
|
25
|
-
"@gm-mobile/c-tool": "^3.9.3-beta.
|
|
26
|
-
"@gm-mobile/locales": "^3.9.3-beta.
|
|
24
|
+
"@gm-mobile/c-react": "^3.9.3-beta.25",
|
|
25
|
+
"@gm-mobile/c-tool": "^3.9.3-beta.25",
|
|
26
|
+
"@gm-mobile/locales": "^3.9.3-beta.25"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@tarojs/components": "3.0.18",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"prop-types": "^15.7.2",
|
|
34
34
|
"react": "^16.13.1"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "4cce964e13b909c02194af1666bafc5f08ac4a93"
|
|
37
37
|
}
|
|
@@ -5,10 +5,9 @@ import UtilMP from '../../util'
|
|
|
5
5
|
export type StatusBarMPProps = HTMLAttributes<HTMLDivElement>
|
|
6
6
|
|
|
7
7
|
const StatusBarMP: FC<StatusBarMPProps> = memo((style, ...rest) => {
|
|
8
|
-
const [height, setHeight] = useState(
|
|
8
|
+
const [height, setHeight] = useState(wx.getSystemInfoSync().statusBarHeight)
|
|
9
9
|
useEffect(() => {
|
|
10
10
|
const rect = UtilMP.getMenuButtonBoundingClientRect()
|
|
11
|
-
|
|
12
11
|
UtilMP.getSystemInfo().then((res) => {
|
|
13
12
|
// 不一定能读到胶囊,或者胶囊占据整个宽, 此时不需要设置statusBar
|
|
14
13
|
return setHeight(rect?.left ? res.statusBarHeight : 0)
|