From 714b4d66381ef86ffee849eb8239f24b4b656745 Mon Sep 17 00:00:00 2001 From: wangjinyi <18071094885@163.com> Date: Wed, 25 Sep 2024 17:23:44 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E4=BF=AE=E6=94=B9react-native-dite-pic?= =?UTF-8?q?ker=E6=8C=87=E5=AF=BC=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zh-cn/react-native-date-picker.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zh-cn/react-native-date-picker.md b/zh-cn/react-native-date-picker.md index 6215ce3a..4960f8cb 100644 --- a/zh-cn/react-native-date-picker.md +++ b/zh-cn/react-native-date-picker.md @@ -87,7 +87,7 @@ export default () => { 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` -### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 +### 在工程根目录的 `oh-package.json5` 添加 overrides 字段 ```json { @@ -98,7 +98,7 @@ export default () => { } ``` -### 2.引入原生端代码 +### 引入原生端代码 目前有两种方法: @@ -132,7 +132,7 @@ ohpm install > [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) -### 3.在 ArkTs 侧引入 NativeDatePickerView 组件 +### 在 ArkTs 侧引入 NativeDatePickerView 组件 找到 **function buildCustomRNComponent()**,一般位于 `entry/src/main/ets/pages/index.ets` 或 `entry/src/main/ets/rn/LoadBundle.ets`,添加: ```diff @@ -165,7 +165,7 @@ const arkTsComponentNames: Array = [ + NativeDatePickerView.NAME, ]; ``` -### 4.运行 +### 运行 点击右上角的 `sync` 按钮 @@ -201,7 +201,7 @@ ohpm install | minimumDate | Minimum selectable date.Example: new Date("2021-01-01") | Date | no | all | yes| | mode | The date picker mode. "datetime", "date", "time" | “'date' \|'time' \| 'datetime'” | yes | all | yes| | onConfirm | Modal only: Date callback when user presses confirm button | (date: Date) => void | no | all | yes| -| onCancel | odal only: Callback for when user presses cancel button or closing the modal by pressing outside it. | () => void | no | all | yes| +| onCancel | Modal only: Callback for when user presses cancel button or closing the modal by pressing outside it. | () => void | no | all | yes| | is24hourSource | Change how the 24h mode (am/pm) should be determined, by device settings or by locale. {'locale', 'device'} (android only, default: 'device') | “'locale' \| 'device'” | no | all | no| | modal | Boolean indicating if modal should be used. Default: "false". When enabled, the other modal props needs to be used. | boolean | no | all | yes| | open | Modal only: Boolean indicating if modal should be open. | boolean | no | all | yes| -- Gitee