From b0e19f33287d5a4ac786a74d6fe75d6193f52ad0 Mon Sep 17 00:00:00 2001 From: sky603629 Date: Tue, 18 Nov 2025 10:59:18 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E4=BF=AE=E6=94=B9=20react-native-picke?= =?UTF-8?q?r-picker=E5=B1=9E=E6=80=A7=E8=A1=A8=E8=BF=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sky603629 --- en/react-native-picker-picker(nocodegen).md | 2 +- en/react-native-picker-picker.md | 53 ++++++-- .../react-native-picker-picker(nocodegen).md | 60 ++++----- zh-cn/react-native-picker-picker.md | 116 +++++++++++++----- 4 files changed, 159 insertions(+), 72 deletions(-) diff --git a/en/react-native-picker-picker(nocodegen).md b/en/react-native-picker-picker(nocodegen).md index 81b267e6a..e8ae2bdad 100644 --- a/en/react-native-picker-picker(nocodegen).md +++ b/en/react-native-picker-picker(nocodegen).md @@ -274,7 +274,7 @@ Check the release version information in the release address of the third-party |----------------------|----------------------------------------------------------------------------------------------------------|---------------|----------|----------|-------------------| | `label` | Displayed value on the Picker Item. | string | Yes | All | Yes | | `value` | Actual value on the Picker Item. | number,string | Yes | All | Yes | -| `color` | Displayed color on the Picker Item. | ColorValue | Yes | All | No | +| `color` | Displayed color on the Picker Item. | ColorValue | No | All | No | | `fontFamily` | Displayed fontFamily on the Picker Item. | string | No | All | No | | `style` | Style to apply to individual item labels. | ViewStyleProp | No | Android | No | | `enabled` | If set to false, the specific item will be disabled, i.e. the user will not be able to make a selection. | boolean | No | Android | No | diff --git a/en/react-native-picker-picker.md b/en/react-native-picker-picker.md index 954f5aa40..2d8c8413e 100644 --- a/en/react-native-picker-picker.md +++ b/en/react-native-picker-picker.md @@ -19,21 +19,35 @@ Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/picker Releases](https://github.com/react-native-oh-library/picker/releases).For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. Go to the project directory and execute the following instruction: +| Library Version | Release Info | Supported RN Version | +| :--- | :--- | :--- | +| 2.6.1 | [@react-native-oh-tpl/picker Releases](https://github.com/react-native-oh-library/picker/releases) | 0.72 | +| 2.11.1 | [@react-native-ohos/picker Releases]() | 0.77 | +For older versions not published to npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. +Navigate to your project directory and enter the following commands: #### **npm** ```bash +# V2.6.1 npm install @react-native-oh-tpl/picker + +# V2.11.1 +npm install @react-native-ohos/picker ``` #### **yarn** ```bash +# V2.6.1 yarn add @react-native-oh-tpl/picker + +# V2.11.1 +yarn add @react-native-ohos/picker ``` @@ -44,7 +58,7 @@ The following code shows the basic use scenario of the repository: ```js import * as React from "react"; -import { Picker } from "@react-native-oh-tpl/picker"; +import { Picker } from "@react-native-picker/picker"; import { View } from "react-native"; export const PickerExample = ()=>{ @@ -94,6 +108,8 @@ Method 1 (recommended): Use the HAR file. Open `entry/oh-package.json5` file and add the following dependencies: +- V2.6.1 + ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -102,10 +118,18 @@ Open `entry/oh-package.json5` file and add the following dependencies: } ``` -Click the `sync` button in the upper right corner. +- V2.11.1 -Alternatively, run the following instruction on the terminal: +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/picker": "file:../../node_modules/@react-native-ohos/picker/harmony/picker.har", + } +``` +Click the `sync` button in the top-right corner. + +Or, run the following in your terminal: ```bash cd entry ohpm install @@ -140,7 +164,12 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) +# V2.6.1 + add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/picker/src/main/cpp" ./picker) + +# V2.11.1 ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/picker/src/main/cpp" ./picker) + # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -185,8 +214,12 @@ Find `function buildCustomRNComponent()`, which is usually located in `entry/src ```diff ... +// V2.6.1 + import { RNCPicker, PICKER_TYPE } from "@react-native-oh-tpl/picker" +// V2.11.1 ++ import { RNCPicker, PICKER_TYPE } from "@react-native-ohos/picker" + @Builder export function buildCustomRNComponent(ctx: ComponentBuilderContext) { ... @@ -220,8 +253,12 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... +// V2.6.1 + import { RNCPickerPackage } from '@react-native-oh-tpl/picker/ts'; +// V2.11.1 ++ import { RNCPickerPackage } from '@react-native-ohos/picker/ts'; + export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ new SamplePackage(ctx), @@ -251,6 +288,11 @@ To use this repository, you need to use the correct React-Native and RNOH versio Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/picker Releases](https://github.com/react-native-oh-library/picker/releases) +| Library Version | Release Info | Supported RN Version | +| :--- | :--- | :--- | +| 2.6.1 | [@react-native-oh-tpl/picker Releases](https://github.com/react-native-oh-library/picker/releases) | 0.72 | +| 2.11.1 | [@react-native-ohos/picker Releases]() | 0.77 | + ## Properties > [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. @@ -283,7 +325,7 @@ Check the release version information in the release address of the third-party |----------------------|----------------------------------------------------------------------------------------------------------|---------------|----------|----------|-------------------| | `label` | Displayed value on the Picker Item. | string | Yes | All | Yes | | `value` | Actual value on the Pickmodeler Item. | number,string | Yes | All | Yes | -| `color` | Displayed color on the Picker Item. | ColorValue | Yes | All | No | +| `color` | Displayed color on the Picker Item. | ColorValue | No | All | No | | `fontFamily` | Displayed fontFamily on the Picker Item. | string | No | All | No | | `style` | Style to apply to individual item labels. | ViewStyleProp | No | Android | No | | `enabled` | If set to false, the specific item will be disabled, i.e. the user will not be able to make a selection. | boolean | No | Android | No | @@ -291,9 +333,6 @@ Check the release version information in the release address of the third-party ## Static Methods -> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. - -> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. | Name | Description | Type | Required | Platform | HarmonyOS Support | |---------|---------------------------------|----------|----------|----------|-------------------| diff --git a/zh-cn/react-native-picker-picker(nocodegen).md b/zh-cn/react-native-picker-picker(nocodegen).md index 34d1eb4e1..491c500e8 100644 --- a/zh-cn/react-native-picker-picker(nocodegen).md +++ b/zh-cn/react-native-picker-picker(nocodegen).md @@ -253,35 +253,35 @@ ohpm install ### PickerProps -| Name | Description | Type | Required | Platform | HarmonyOS Support | -|---------------------------|---------------------------------------------------------------------------------------------------|--------------------------------------------------------------|----------|-----------------------|-------------------| -| `onValueChange` | Callback for when an item is selected. | function | No | All | Yes | -| `selectedValue` | Value matching value of one of the items. Can be a string or an integer. | any | No | All | Yes | -| `style` | NA | pickerStyleType | No | All | Yes | -| `testID` | Used to locate this view in end-to-end tests. | string | No | All | Yes | -| `enabled` | If set to false, the picker will be disabled, i.e. the user will not be able to make a selection. | boolean | No | Android, Web, Windows | Yes | -| `mode` | On Android, specifies how to display the selection items when the user taps on the picker | enum('dialog', 'dropdown') | No | Android | No | -| `dropdownIconColor` | On Android, specifies color of dropdown triangle. | ColorValue | No | Android | No | -| `dropdownIconRippleColor` | On Android, specifies ripple color of dropdown triangle. | ColorValue | No | Android | No | -| `prompt` | Prompt string for this picker, used on Android in dialog mode as the title of the dialog. | string | No | Android | No | -| `itemStyle` | Style to apply to each of the item labels. | [text styles](https://reactnative.dev/docs/text-style-props) | No | iOS, Windows | partially | -| `numberOfLines` | On Android & iOS, used to truncate the text with an ellipsis after computing the text layout. | number | No | Android, iOS | No | -| `onBlur` | NA | function | No | Android | No | -| `onFocus` | NA | function | No | Android | No | -| `selectionColor` | Color to apply to the selection indicator. | ColorValue | No | iOS | Yes | -| `themeVariant` | NA | enum('light', 'dark') | No | iOS | No | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :--- | :--- | :--- | :--- | :--- | :--- | +| `onValueChange` | 选中某项时的回调函数。 | function | No | All | Yes | +| `selectedValue` | 与其中某项的值相匹配的值。可以是字符串或整数。 | any | No | All | Yes | +| `style` | 应用于 Picker 视图的样式。 | pickerStyleType | No | All | Yes | +| `testID` | 用于在端到端测试中定位此视图。 | string | No | All | Yes | +| `enabled` | 如果设置为 false,选择器将被禁用,即用户将无法进行选择。 | boolean | No | Android, Web, Windows | Yes | +| `mode` | 在 Android 上,指定用户点击选择器时如何显示选项。 | enum('dialog', 'dropdown') | No | Android | No | +| `dropdownIconColor` | 在 Android 上,指定下拉三角形的颜色。 | ColorValue | No | Android | No | +| `dropdownIconRippleColor` | 在 Android 上,指定下拉三角形的波纹颜色。 | ColorValue | No | Android | No | +| `prompt` | 此选择器的提示字符串,在 Android 的 dialog 模式下用作对话框标题。 | string | No | Android | No | +| `itemStyle` | 应用于每个选项标签的样式。 | [text styles](https://reactnative.dev/docs/text-style-props) | No | iOS, Windows | partially | +| `numberOfLines` | 在 Android 和 iOS 上,用于在计算文本布局后用省略号截断文本。 | number | No | Android, iOS | No | +| `onBlur` | 当选择器失去焦点时的回调函数。 | function | No | Android | No | +| `onFocus` | 当选择器获得焦点时的回调函数。 | function | No | Android | No | +| `selectionColor` | 应用于选中指示器的颜色。 | ColorValue | No | iOS | Yes | +| `themeVariant` | 指定 iOS 上的主题变体(例如 'light' 或 'dark')。 | enum('light', 'dark') | No | iOS | No | ### PickerItemProps -| Name | Description | Type | Required | Platform | HarmonyOS Support | -|----------------------|----------------------------------------------------------------------------------------------------------|---------------|----------|----------|-------------------| -| `label` | Displayed value on the Picker Item. | string | Yes | All | Yes | -| `value` | Actual value on the Picker Item. | number,string | Yes | All | Yes | -| `color` | Displayed color on the Picker Item. | ColorValue | Yes | All | No | -| `fontFamily` | Displayed fontFamily on the Picker Item. | string | No | All | No | -| `style` | Style to apply to individual item labels. | ViewStyleProp | No | Android | No | -| `enabled` | If set to false, the specific item will be disabled, i.e. the user will not be able to make a selection. | boolean | No | Android | No | -| `contentDescription` | Sets the content description to the Picker Item. | string | No | Android | No | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :--- | :--- | :--- | :--- | :--- | :--- | +| `label` | 显示在 Picker 选项上的文字。 | string | Yes | All | Yes | +| `value` | Picker 选项的实际值。 | number,string | Yes | All | Yes | +| `color` | Picker 选项显示的颜色。 | ColorValue | No | All | No | +| `fontFamily` | Picker 选项显示的字体。 | string | No | All | No | +| `style` | 应用于单个选项标签的样式。 | ViewStyleProp | No | Android | No | +| `enabled` | 如果设置为 false,该特定选项将被禁用,即用户无法选中它。 | boolean | No | Android | No | +| `contentDescription` | 设置 Picker 选项的内容描述。 | string | No | Android | No | ## 静态方法 @@ -289,10 +289,10 @@ ohpm install > [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 -| Name | Description | Type | Required | Platform | HarmonyOS Support | -|---------|---------------------------------|----------|----------|----------|-------------------| -| `blur` | Programmatically closes picker. | function | No | Android | No | -| `focus` | Programmatically opens picker. | function | No | Android | No | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :--- | :--- | :--- | :--- | :--- | :--- | +| `blur` | 以编程方式关闭选择器。 | function | No | Android | No | +| `focus` | 以编程方式打开选择器。 | function | No | Android | No | ## 遗留问题 diff --git a/zh-cn/react-native-picker-picker.md b/zh-cn/react-native-picker-picker.md index 99d08e884..229164063 100644 --- a/zh-cn/react-native-picker-picker.md +++ b/zh-cn/react-native-picker-picker.md @@ -16,7 +16,14 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/picker Releases](https://github.com/react-native-oh-library/picker/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 2.6.1 | [@react-native-oh-tpl/picker Releases](https://github.com/react-native-oh-library/picker/releases) | 0.72 | +| 2.11.1 | [@react-native-ohos/picker Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -25,13 +32,21 @@ #### **npm** ```bash +# V2.6.1 npm install @react-native-oh-tpl/picker + +# V2.11.1 +npm install @react-native-ohos/picker ``` #### **yarn** ```bash +# V2.6.1 yarn add @react-native-oh-tpl/picker + +# V2.11.1 +yarn add @react-native-ohos/picker ``` @@ -42,7 +57,8 @@ yarn add @react-native-oh-tpl/picker ```js import * as React from "react"; -import { Picker } from "@react-native-oh-tpl/picker"; +import { Picker } from "@react-native-picker/picker"; + import { View } from "react-native"; export const PickerExample = ()=>{ @@ -63,6 +79,8 @@ export const PickerExample = ()=>{ ## 使用 Codegen +> [!TIP] V2.11.1 不需要执行 Codegen。 + 本库已经适配了 Codegen ,在使用前需要主动执行生成三方库桥接代码,详细请参考 [Codegen 使用文档。](/zh-cn/codegen.md) ## Link @@ -95,6 +113,8 @@ export const PickerExample = ()=>{ 打开 `entry/oh-package.json5`,添加以下依赖 +- V2.6.1 + ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -103,6 +123,16 @@ export const PickerExample = ()=>{ } ``` +- V2.11.1 + +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + + "@react-native-ohos/picker": "file:../../node_modules/@react-native-ohos/picker/harmony/picker.har", + } +``` + 点击右上角的 `sync` 按钮 或者在终端执行: @@ -140,7 +170,12 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) +# V2.6.1 + add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/picker/src/main/cpp" ./picker) + +# V2.11.1 ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/picker/src/main/cpp" ./picker) + # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -184,8 +219,12 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... +// V2.6.1 + import { RNCPicker, PICKER_TYPE } from "@react-native-oh-tpl/picker" +// V2.11.1 ++ import { RNCPicker, PICKER_TYPE } from "@react-native-ohos/picker" + @Builder export function buildCustomRNComponent(ctx: ComponentBuilderContext) { ... @@ -219,8 +258,12 @@ const arkTsComponentNames: Array = [ ```diff ... +// V2.6.1 + import { RNCPickerPackage } from '@react-native-oh-tpl/picker/ts'; +// V2.11.1 ++ import { RNCPickerPackage } from '@react-native-ohos/picker/ts'; + export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ new SamplePackage(ctx), @@ -248,7 +291,12 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/picker Releases](https://github.com/react-native-oh-library/picker/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 2.6.1 | [@react-native-oh-tpl/picker Releases](https://github.com/react-native-oh-library/picker/releases) | 0.72 | +| 2.11.1 | [@react-native-ohos/picker Releases]() | 0.77 | ## 属性 @@ -258,42 +306,42 @@ ohpm install ### PickerProps -| Name | Description | Type | Required | Platform | HarmonyOS Support | -|---------------------------|---------------------------------------------------------------------------------------------------|--------------------------------------------------------------|----------|-----------------------|-------------------| -| `onValueChange` | Callback for when an item is selected. | function | No | All | Yes | -| `selectedValue` | Value matching value of one of the items. Can be a string or an integer. | any | No | All | Yes | -| `style` | NA | pickerStyleType | No | All | Yes | -| `testID` | Used to locate this view in end-to-end tests. | string | No | All | Yes | -| `enabled` | If set to false, the picker will be disabled, i.e. the user will not be able to make a selection. | boolean | No | Android, Web, Windows | Yes | -| `mode` | On Android, specifies how to display the selection items when the user taps on the picker | enum('dialog', 'dropdown') | No | Android | No | -| `dropdownIconColor` | On Android, specifies color of dropdown triangle. | ColorValue | No | Android | No | -| `dropdownIconRippleColor` | On Android, specifies ripple color of dropdown triangle. | ColorValue | No | Android | No | -| `prompt` | Prompt string for this picker, used on Android in dialog mode as the title of the dialog. | string | No | Android | No | -| `itemStyle` | Style to apply to each of the item labels. | [text styles](https://reactnative.dev/docs/text-style-props) | No | iOS, Windows | partially | -| `numberOfLines` | On Android & iOS, used to truncate the text with an ellipsis after computing the text layout. | number | No | Android, iOS | No | -| `onBlur` | NA | function | No | Android | No | -| `onFocus` | NA | function | No | Android | No | -| `selectionColor` | Color to apply to the selection indicator. | ColorValue | No | iOS | Yes | -| `themeVariant` | NA | enum('light', 'dark') | No | iOS | No | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :--- | :--- | :--- | :--- | :--- | :--- | +| `onValueChange` | 选中某项时的回调函数。 | function | No | All | Yes | +| `selectedValue` | 与其中某项的值相匹配的值。可以是字符串或整数。 | any | No | All | Yes | +| `style` | 应用于 Picker 视图的样式。 | pickerStyleType | No | All | Yes | +| `testID` | 用于在端到端测试中定位此视图。 | string | No | All | Yes | +| `enabled` | 如果设置为 false,选择器将被禁用,即用户将无法进行选择。 | boolean | No | Android, Web, Windows | Yes | +| `mode` | 在 Android 上,指定用户点击选择器时如何显示选项。 | enum('dialog', 'dropdown') | No | Android | No | +| `dropdownIconColor` | 在 Android 上,指定下拉三角形的颜色。 | ColorValue | No | Android | No | +| `dropdownIconRippleColor` | 在 Android 上,指定下拉三角形的波纹颜色。 | ColorValue | No | Android | No | +| `prompt` | 此选择器的提示字符串,在 Android 的 dialog 模式下用作对话框标题。 | string | No | Android | No | +| `itemStyle` | 应用于每个选项标签的样式。 | [text styles](https://reactnative.dev/docs/text-style-props) | No | iOS, Windows | partially | +| `numberOfLines` | 在 Android 和 iOS 上,用于在计算文本布局后用省略号截断文本。 | number | No | Android, iOS | No | +| `onBlur` | 当选择器失去焦点时的回调函数。 | function | No | Android | No | +| `onFocus` | 当选择器获得焦点时的回调函数。 | function | No | Android | No | +| `selectionColor` | 应用于选中指示器的颜色。 | ColorValue | No | iOS | Yes | +| `themeVariant` | 指定 iOS 上的主题变体(例如 'light' 或 'dark')。 | enum('light', 'dark') | No | iOS | No | ### PickerItemProps -| Name | Description | Type | Required | Platform | HarmonyOS Support | -|----------------------|----------------------------------------------------------------------------------------------------------|---------------|----------|----------|-------------------| -| `label` | Displayed value on the Picker Item. | string | Yes | All | Yes | -| `value` | Actual value on the Pickmodeler Item. | number,string | Yes | All | Yes | -| `color` | Displayed color on the Picker Item. | ColorValue | Yes | All | No | -| `fontFamily` | Displayed fontFamily on the Picker Item. | string | No | All | No | -| `style` | Style to apply to individual item labels. | ViewStyleProp | No | Android | No | -| `enabled` | If set to false, the specific item will be disabled, i.e. the user will not be able to make a selection. | boolean | No | Android | No | -| `contentDescription` | Sets the content description to the Picker Item. | string | No | Android | No | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :--- | :--- | :--- | :--- | :--- | :--- | +| `label` | 显示在 Picker 选项上的文字。 | string | Yes | All | Yes | +| `value` | Picker 选项的实际值。 | number,string | Yes | All | Yes | +| `color` | Picker 选项显示的颜色。 | ColorValue | No | All | No | +| `fontFamily` | Picker 选项显示的字体。 | string | No | All | No | +| `style` | 应用于单个选项标签的样式。 | ViewStyleProp | No | Android | No | +| `enabled` | 如果设置为 false,该特定选项将被禁用,即用户无法选中它。 | boolean | No | Android | No | +| `contentDescription` | 设置 Picker 选项的内容描述。 | string | No | Android | No | ## 静态方法 -| Name | Description | Type | Required | Platform | HarmonyOS Support | -|---------|---------------------------------|----------|----------|----------|-------------------| -| `blur` | Programmatically closes picker. | function | No | Android | No | -| `focus` | Programmatically opens picker. | function | No | Android | No | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :--- | :--- | :--- | :--- | :--- | :--- | +| `blur` | 以编程方式关闭选择器。 | function | No | Android | No | +| `focus` | 以编程方式打开选择器。 | function | No | Android | No | ## 遗留问题 @@ -306,4 +354,4 @@ ohpm install ## 开源协议 -本项目基于 [The MIT License (MIT)](https://github.com/react-native-picker/picker/blob/master/LICENSE) ,请自由地享受和参与开源。 +本项目基于 [The MIT License (MIT)](https://github.com/react-native-picker/picker/blob/master/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file -- Gitee