Introduced by Vant Mini Program

                           **倘若完成以下步骤报错,重启即可(亲测)**

first step

Open the file in the Explorer, enter cmd , enter in the small black box

npm  init

(Enter all the way)

Second step

Input command:

npm i @vant/weapp -S --production

third step

Click on WeChat Developer Tools to build npm

the fourth step

Click on the top right corner of the details, then the local settings, and then select the use npm module

the fifth step

Delete "style": "v2" in app.json

Sixth step

Take the button as an example
to introduce the path in the json file of the component

** "van-button": "@vant/weapp/button/index",**

Then on the page

<van-button type="primary">按钮</van-button>

Guess you like

Origin blog.csdn.net/wsxDream/article/details/110467286