init
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import Taro from "@tarojs/taro";
|
||||
import {useEffect, useState} from "react";
|
||||
import {View} from "@tarojs/components";
|
||||
|
||||
export default () => {
|
||||
const [safeBottom, setSafeBottom] = useState(0)
|
||||
|
||||
useEffect(() => {
|
||||
const info = Taro.getSystemInfoSync()
|
||||
setSafeBottom((info.screenHeight - info.safeArea!.bottom) || 0)
|
||||
}, []);
|
||||
|
||||
return <View style={{ height: `${safeBottom}px` }}></View>
|
||||
}
|
||||
Reference in New Issue
Block a user