Vue-scaffolding creation

The scaffolding of vue3 in this article is mainly used vue-clito create, and it can only be created successfully when there is a network

1. Download node.js

1. Open node's official website node official website
2. Click the location of the picture below to download
insert image description here
3. Check whether the installation is successful in the cmd terminal
insert image description here

2. Install @vue/cli globally

Open the cmd terminal and enter the command npm install -g @vue/cliand 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:
insert image description here

3.2 Create a project

1. Use the command vue create project name to create a project
insert image description here
2. Select Manually select features at this stage (manually created) as you learn more in the future, you can directly select Default ([Vue3...])通过键盘上下键进行选择,通过空格键确认,回车进入下一步
insert image description here
3. Select the parameters that need to be configured (here directly Enter)
insert image description here
4. Select version
insert image description here
5. At this time, it will pop up whether to use the history method to create the route. The default selection is y.
insert image description here
6. Select the code verification specification, the first item is selected by default, and only the error prompt will be displayed.
insert image description here
insert image description here
7. Whether to save the template prompt, here It is to choose to save the template (optional) insert image description here
8. If there is no picture to explain, choose the default one

3.3 Created successfully

insert image description here

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.jsadd code to the file to turn off syntax checking
insert image description here

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
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/qq_52998673/article/details/127700825