The applet uses npm to introduce third-party components

environment

Computer: Mac
Software: Install the 终端application first NPM, how to install it, please search by yourself~


step

1. Open the terminal and go cdto the applet project根目录

2. Use the command:npm init

3. All configurations can be used directly. 默认的
Please add image description
All that needs to be filled can be directly pressed. EnterSkip
here I filled in the authoritem and
finally enter it! 4. Install third-party componentsyes
Please add image description

npm install xxx

xxxis the name of the third-party component

5. Open the applet project in the
upper right corner: Details -> Local Settings -> Check使用 npm 模块

6. Menu bar: Tools -> Click构建 npm

7. Finally, refer to the third-party instructions for use


my applet

Please add image description


Guess you like

Origin blog.csdn.net/xjh093/article/details/122841283