[Nut Pie] How to select a picture in HarmonyOS and OpenHarmony and display it on the desktop

[Nut Pie] How to select a picture in HarmonyOS and OpenHarmony and display it on the desktop

Nut, Ecological Technology Expert of Jiangsu Runkaihong Digital Technology Co., Ltd. HUAWEI Developer Experts (HUAWEI Developer Experts) Developer School "Top Ten" Lecturer InfoQ Signed Author OpenHarmony
Active Lecturer, OpenHarmony School Source Ambassador, CSDN Blog Expert, 51CTO Blog Expert, Alibaba Cloud Blog Expert, Electronic Enthusiast Community Star.
As the team leader in the second phase of the "Battle Code Pioneer", he has cultivated three small team leaders, led 100+ team members to complete the submission and integration of Pr, and contributed 1.5w lines of code in total.

1. Import the selector module.

import picker from '@ohos.file.picker';

2. Create a gallery selection option instance.

const photoSelectOptions = new picker.PhotoSelectOptions

Guess you like

Origin blog.csdn.net/qq_39132095/article/details/131057773