3 Ways to Create a Vue Single Page Application

First download the Vue CLI

Official link: https://cli.vuejs.org/zh/guide/installation.html

Install:

npm install -g @vue/cli

Check version:

vue --version

1. Command line creation (recommended)

vue create 项目名

After execution, many options will be selected, most of which are defaulted.
After the operation is complete, enter the following command to make the project run

npm run serve

The effect is as follows
insert image description here

2. Vue ui (not recommended)

Enter in the project folder

vue create 项目名
vue ui

After waiting for a long time. . . .
insert image description here
After the loading is complete, the page will pop up automatically, and we can operate the project on this page
insert image description here

3. Vite (popular in the future, not stable yet)

Enter the command under the project folder

npm init vite-app 项目名
cd 项目名
npm i
npm run dev

Wait for loading, and then enter the local link.
insert image description here
The effect is as follows
insert image description here

Guess you like

Origin blog.csdn.net/weixin_52249641/article/details/123949234