<template>
  <div id="app">
    <h2>vue路由</h2>
    <!-- 跳转路由 to 跳转的路径 -->
    <router-link to="/home">首页</router-link>
    <br>
    <router-link to="/list">列表</router-link>
    <br>
    <router-link to="/new">新的</router-link>
    <div class="size">
      <!-- 放置页面/组件的指定位置 -->
      <router-view></router-view>
    </div>
  </div>
</template>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
.size {
  width: 800px;
  height: 500px;
  border: 1px solid #f00;
  background: #42b983;
}
</style>
