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
This article example shares the specific code of ...
View Database show databases; Create a database c...
Recommended reading: MySQL 8.0.19 supports accoun...
Nginx first decides which server{} block in the c...
Table of contents 1. Solution 1 (UDF) Demo Case 2...
This article example shares the specific code of ...
When I was asked this question, I was ignorant an...
Table of contents WXS Response Event Plan A Page ...
Table of contents 1. Insert the queried results 2...
Preface There are two types of nginx modules, off...
Table of contents 1. How to use mixin? 2. Notes o...
After the National Day holiday, did any of you fi...
Table of contents Preface Hello World image Set b...
<base target=_blank> changes the target fram...
Table of contents 1. Pull the image 2. Run the im...