03-vue-cli-project creation

1. Open the folder where the new project is stored

        Open the start menu, enter CMD, or use the shortcut key win+R, enter CMD, press Enter, and a command prompt will pop up. Open the project directory you are about to create

2 Create a new project based on the template

        Enter "vue init webpack project name (in English)" in the current directory

        vue init webpack mytest

Note that select No as follows

Success as shown below

3 The project directory structure after initialization is as follows:

4 cnpm run dev Run the project to test whether the project can work normally, this way is to use nodejs to start.

5. Enter the address http://localhost:8080 to visit, as shown in the figure

6.vue-cli set startup page

1. Create Login.vue in the components directory of src

2. Open the src---router---index.js file and import the login.vue module import Login from

'@/components/Login'

Change the value of routing address name and component, as shown in the figure

3. Open App.vue and delete the image log code, as shown in the figure

4. The change is complete

Guess you like

Origin blog.csdn.net/weixin_46048259/article/details/126824105