首先写这篇文章之前先声明一下,这篇文章是在空余时间写出来的,后期还会再往里面添加东西或者改动的,如果有哪里不对也欢迎指出。
在学习过程中我都是先阅读一遍官方文档,然后看例子学的,因为个人觉得在做的过程中学习知识是比较快的。下面就遇到了这个问题,$route.parame.id是什么意思呢,在网上查了好多文档,了解到这些东西。下面先看一下程序
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>嵌套路由</title>
<script src="vue.js" type="text/javascript"></script>
<script src="vue-router.js" type="text/javascript"></script>
<!--首先引入vue和vue-router.js-->
<style type="text/css">
*{padding: 0px;margin: 0px;}
li{list-style: none;float: left;margin: 10px 20px;}
a{text-decoration: none;}
a:hover{cursor: pointer;}
.show{width: 300px;height: 300px;background: #ccc;float: left;margin: 20px 0px;}
.clear{clear: both;}
</style>
</head>
<body>
<!--文档结