The scaffolding of vue3 in this article is mainly used vue-cli
to create, and it can only be created successfully when there is a network
Article directory
1. Download node.js
1. Open node's official website node official website
2. Click the location of the picture below to download
3. Check whether the installation is successful in the cmd terminal
2. Install @vue/cli globally
Open the cmd terminal and enter the command
npm install -g @vue/cli
and wait for the download to complete
3. Create a project using vue-cli
3.1 Use vscode to open the terminal
Use the shortcut key Ctrl+` (the symbol on the left of 1) in vscode
to command the box as follows:
3.2 Create a project
1. Use the command vue create project name to create a project
2. Select Manually select features at this stage (manually created) as you learn more in the future, you can directly select Default ([Vue3...]) –通过键盘上下键进行选择,通过空格键确认,回车进入下一步
3. Select the parameters that need to be configured (here directly Enter)
4. Select version
5. At this time, it will pop up whether to use the history method to create the route. The default selection is y.
6. Select the code verification specification, the first item is selected by default, and only the error prompt will be displayed.
7. Whether to save the template prompt, here It is to choose to save the template (optional)
8. If there is no picture to explain, choose the default one
3.3 Created successfully
4. Matters needing attention
1. Vue3 will have its own code checking mechanism by default when it is created. In order to prevent this checking mechanism from affecting subsequent coding, you can
vue.config.js
add code to the file to turn off syntax checking
2. When you need to copy the code to others, you need to make relevant modifications to the file (not necessary). Because the size of the file reaches 100 megabytes, you can node_modules文件夹
delete the file, and you need to load the file later, you can in terminal run command
3. Two plug-ins are needed, which can be downloaded in vscode