From dca9a8daf5b633cd67104c37b5b42d886b10f89f Mon Sep 17 00:00:00 2001 From: "2206069183@qq.com" <2206069183@qq.com> Date: Sat, 11 May 2024 15:19:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[Issues:=20#I9OGSI]=20=E4=BF=AE=E6=94=B9rea?= =?UTF-8?q?ct-native-drawer-layout-polyfill=E6=8C=87=E5=AF=BC=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zh-cn/react-native-drawer-layout-polyfill.md | 26 ++++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/zh-cn/react-native-drawer-layout-polyfill.md b/zh-cn/react-native-drawer-layout-polyfill.md index 0f77c8c2..56db0e4c 100644 --- a/zh-cn/react-native-drawer-layout-polyfill.md +++ b/zh-cn/react-native-drawer-layout-polyfill.md @@ -154,6 +154,19 @@ const App = () => { 弹框状态切换触发:{drawerStateChangedOutput} + onChangeText(text)} + value={value} + /> + + + + + + + + + {objText1} + {objText2} + + + + Array + + + + + + + + + + + + + {arrText1} + {arrText2} + + + + + String + + + + + + + + + + + + + + + + + {strText1} + {strText2} + + + + RegExp + + + + + + + + + + + + {regText1} + {regText2} + + + + Date + + + + + + + + + + + + + + + + + + + + + + + + + + {dateText1} + {dateText2} + + + ) + + +} + +const styles = StyleSheet.create({ + container:{ + width: '100%', + height: '100%' + }, + text:{ + width: '100%', + height: 30, + backgroundColor: '#eee', + marginTop: 5, + fontSize: 16, + lineHeight: 30, + textAlign: 'center', + numberOfLines: 1 + }, + flex:{ + display: 'flex', + flexDirection: 'row', + flexWrap: 'wrap', + justifyContent:'space-around', + }, + bord:{ + borderWidth: 1, + minHeight: 30, + marginTop: 10, + fontSize: 16, + textAlign:'center' + } +}) + +export default Babel; +``` + +## 兼容性 + +在以下版本验证通过 + +1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Preview2; IDE:DevEco Studio 5.0.3.200; ROM:205.0.0.18; + +## 属性 + +详情见[react-native-drawer-layout-polyfill](https://reactnative.dev/docs/drawerlayoutandroid) + +| Name | Description | Type | Required | Platform | HarmonyOS Support | note | +| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | ----------- | ----------------- | ------------------------------------------------------ | +| renderNavigationView | The navigation view that will be rendered to the side of the screen and can be pulled in. | function | YES | Android IOS | YES | | +| drawerPosition | Specifies the side of the screen from which the drawer will slide in. By default it is set to left. enum('left', 'right') | string | NO | Android IOS | YES | | +| drawerWidth | Specifies the width of the drawer, more precisely the width of the view that be pulled in from the edge of the window. | number | NO | Android IOS | YES | | +| keyboardDismissMode | Determines whether the keyboard gets dismissed in response to a drag. 'none' (the default), drags do not dismiss the keyboard. 'on-drag', the keyboard is dismissed when a drag begins. | string | NO | Android IOS | YES | | +| drawerLockMode | Specifies the lock mode of the drawer. The drawer can be locked in 3 states: unlocked (default), meaning that the drawer will respond (open/close) to touch gestures. locked-closed, meaning that the drawer will stay closed and not respond to gestures. locked-open, meaning that the drawer will stay opened and not respond to gestures. The drawer may still be opened and closed programmatically (openDrawer/closeDrawer). | string | NO | Android IOS | YES | | +| drawerBackgroundColor | Specifies the background color of the drawer. The default value is white. If you want to set the opacity of the drawer, use rgba. | string | NO | Android IOS | YES | | +| statusBarBackgroundColor | Make the drawer take the entire screen and draw the background of the status bar to allow it to open over the status bar. It will only have an effect on API 21+. IOS and harmony are not supported. | string | NO | Android | NO | The original library only does the function of Android | +| onDrawerOpen | Function called whenever the navigation view has been opened. | function | NO | Android IOS | YES | | +| onDrawerClose | Function called whenever the navigation view has been closed. | function | NO | Android IOS | YES | | +| onDrawerSlide | Function called whenever there is an interaction with the navigation view. | function | NO | Android IOS | YES | | +| onDrawerStateChanged | Function called when the drawer state has changed. The drawer can be in 3 states: idle, meaning there is no interaction with the navigation view happening at the time | function | NO | Android IOS | YES | | + +## 方法 + +| Name | Description | Required | Platform | HarmonyOS Support | +| ----------- | ------------------ | -------- | ----------- | ----------------- | +| openDrawer | Closes the drawer. | NO | Android IOS | YES | +| closeDrawer | Opens the drawer. | NO | Android IOS | YES | + +## 遗留问题 + +## 其他 -- Gitee