<template>
  <div class="app">
    <h1>哈哈哈哈哈</h1>
    <div class="nav">
      <!-- replace -->
      <router-link push active-class="news" to="/home">首页</router-link>
      <router-link push active-class="news" to="/list">列表</router-link>
      <router-link
        push
        active-class="news"
        :to="{ name: 'shangpin', query: { names: '图图', id: 433 } }"
        >商品</router-link
      >
      <router-link push active-class="news" to="/my">我的</router-link>
    </div>
    <keep-alive include="My">
    <!-- <keep-alive exclude="My,Home"> -->
    <!-- <keep-alive include="My,Home"> -->
      <router-view></router-view>
    </keep-alive>
  </div>
</template>

<script>
export default {
};
</script>

<style lang="scss" scoped>
* {
  text-decoration: none;
}
.nav {
  width: 400px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  a {
    color: #000;
    font-size: 30px;
    font-weight: bold;
  }
}
.news {
  color: red !important;
}
</style>