side.vue 743 Bytes
<template>
  <div class="side">
      <ul>
          <li v-for="item in navs" @click="handleClick(item.path)">
            {{item.name}}
          </li>
      </ul>
  </div>
</template>

<script>
    export default {
        data () {
            return {
                navs: [
                    {name: '读者列表', path: '/reader'},
                    {name: '图书列表', path: '/book'}
                ]
            }
        },
        methods: {
            handleClick (path) {
                this.$router.push(path);
            }
        }
    }
</script>

<style>
    .side {
        width: 200px;
        height: 500px;
        background-color: rgb(184, 160, 131)
    }
    ul li {
        cursor: pointer;
    }
</style>