Install vue scaffolding 01 nodejs installation 02 Scaffolding global installation npm i -g @vue/cli 03 Check whether the installation is successful vue -V
Create a project 01 Switch to the root directory/the directory where the project needs to be located cd/ 02 vue create myvue Create a myvue project
Run the project 01 cd myvue switch to the project directory 02 npm run serve run the project
2. Routing
Built-in component 01 router-view stores the page 02 router-link changes the address bar and changes the hash valueThe to attribute changes the address bar
programming jump 01 .push(“/”) jump and add a history record 02 .replace(“/”) jump replace (leave current history record) 03 back() return .forward() go forward 04 .go( -1) Go back one step 05 .go(1) go one step forward
Three steps to create a route ⭐⭐⭐ (refer to the picture below) 01 Create a new file ⭐ 02 Configure a registered route ⭐ 03 Add a link ⭐