Problem description: Experimental results and discussion: 1. Create a vue-cli default project (containing only babel)2. Enter the creation file
3. Check the configuration
4. Create views folder
5. Set up APP.vueSet up as follows: <template> <div id="app"> <div id="nav"> <router-link to="/">home</router-link> | <router-link to="/about">about</router-link> </div> <router-view/> </div> </template> <style> #app { text-align: center; margin-top: 60px; } </style> 6. Configure main.jsimport Vue from 'vue' import Router from 'vue-router' import Home from './views/Home.vue' Vue.use(Router) export default new Router({ mode: 'history', base: process.env.BASE_URL, routes: [ { path: '/', name: 'home', component: Home }, { path: '/about', name: 'about', component: () => import( './views/About.vue') } ] }) 7. Operation resultsas follows: Summary of the problem: In this experiment, This is the end of this article about how to implement page jump in vue project. For more relevant content about how to implement page jump in vue project, please search previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: HTML4.0 element default style arrangement
MySQL 5.7.20 zip installation, the specific conte...
Vue calls the PC camera to take pictures in real ...
Table of contents npm download step (1) Import (2...
When using Navicat to connect to a remote Linux M...
Because I wrote a Python program and intensively ...
1. First install node, express, express-generator...
Table of contents Typical waterfall website Water...
This article lists some tips and codes about form...
The pitfalls of MySQL read-write separation The m...
When using CSS pseudo-elements to control element...
【author】 Liu Bo: Senior Database Manager at Ctrip...
Table of contents The creation and confusion of n...
Sublime Sublime Text is a code editor (Sublime Te...
1. First prepare the MySQL and Eclipse environmen...
This article mainly introduces common strategies ...