2 Introduction and Use of Third-Party Libraries
Official documentation link: Common Questions About Third-Party Library Usage
2.1 Obtaining Available Third-Party Libraries
Third-party libraries available through ohpm are summarized on GitCode: tpc_resource: Third-Party Component Resource Summary - GitCode

2.2 Using ohpm to Import Third-Party Libraries
2.2.1 Terminal Method
Right-click the project engineering folder, select to open the terminal, and use the following command to enter the entry directory.
cd entry
# To import "dayjs" as an example, execute the following command to install
ohpm install dayjs
# Directly reference in the corresponding js file.
import dayjs from 'dayjs';2.2.2 Modifying oh-package.json5 Method
Open the entry directory under the project directory and find the oh-package.json5 file in that directory.
Write the third-party library you want to install in the oh-package.json5 file. Using "dayjs" as an example, the sample is as follows:
{
"dependencies": {
"dayjs": "^1.10.4"
}
}