路由传参的方式
- 动态路由传参
{
path: "/home/:id/:name/:age’,
component: home
} - params传参
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="./vue.js"></script>
<script src="./vue-router.js"></script>
<title>Document</title>
<style>
.router-link-active{
color: rgb(118, 160, 1);
}