Vant website link

Installing dependency packages

1. Ensure that Vant and babel-plugin-import are installed

Modify the babel.config.js configuration

2. If you have done all the above, check whether babel.config.js is configured

Use in a file (no need to write this if globally imported)

3. Make sure to import in the red box below, ([button.name]: Button,) this is a point not explained on the official website, need to be added by personal, or else insert picture description here

The problem summary

4. There are two points in the final appearance of no style;

  • 1. If the babel-plugin-import dependency is installed, you need to restart the project. Restart the project and the refresh page will appear
  • 2. If the first method does not work, let’s check if there is vue.config.js in the project structure. According to the result of online check, most of them are for requireModuleExtension in vue.config.js

Note: this article refers to the programmer base camp, I do the backup record in this use, I use completely can solve the problem, if there are new suggestions and opinions, welcome to point out