Skip to content

Commit

Permalink
fix(rn): add minheight to pagecomponent (#9695)
Browse files Browse the repository at this point in the history
* fix(rn): add minheight to pagecomponent

* chore(rn): peerDependencies rm unused react & react-native

Co-authored-by: chenjiajian <798095202@qq.com>
  • Loading branch information
zhiqingchen and Chen-jj authored Jul 7, 2021
1 parent 3ff2e39 commit fdc7481
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
2 changes: 0 additions & 2 deletions packages/taro-components-rn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@
"expo-av": "~8.6.0",
"expo-barcode-scanner": "~9.0.0",
"expo-camera": "~9.0.0",
"react": "*",
"react-native": "*",
"react-native-webview": "^11.6.4"
},
"resolutions": {
Expand Down
2 changes: 0 additions & 2 deletions packages/taro-rn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@
"expo-location": "^9.0.1",
"expo-permissions": "~9.3.0",
"expo-sensors": "^9.1.0",
"react": "*",
"react-native": "*",
"react-native-image-resizer": "^1.4.0",
"react-native-safe-area-context": "^3.1.8",
"react-native-syan-image-picker": "0.4.10",
Expand Down
2 changes: 0 additions & 2 deletions packages/taro-router-rn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
"license": "MIT",
"peerDependencies": {
"@react-native-community/masked-view": "^0.1.10",
"react": "*",
"react-native": "*",
"react-native-gesture-handler": "^1.8.0",
"react-native-reanimated": "^1.13.1",
"react-native-safe-area-context": "^3.1.8",
Expand Down
2 changes: 0 additions & 2 deletions packages/taro-runtime-rn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
"url": "https://github.com/NervJS/taro/issues"
},
"peerDependencies": {
"react": "*",
"react-native": "*"
},
"dependencies": {
"@tarojs/components-rn": "3.2.14",
Expand Down
7 changes: 6 additions & 1 deletion packages/taro-runtime-rn/src/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ export function createPageConfig (Page: any, pageConfig: PageConfig): any {
ScreenPage = React.forwardRef((props, ref) => {
const newProps: React.Props<any> = { ...props }
newProps.ref = ref
return h(View, { ...newProps }, h(Page, { ...props }, null))
return h(View, {
style: {
minHeight: '100%'
},
...newProps
}, h(Page, { ...props }, null))
})
}

Expand Down

0 comments on commit fdc7481

Please sign in to comment.