天天看點

vue使用keep-alive的include 和 exclude屬性,緩存不生效?

下面我要排除NotFound頁面,不讓他緩存

<template>
  <div id="app">
    <transition :name="transitionName">
      <keep-alive exclude="NotFound">
        <router-view></router-view>
      </keep-alive>
    </transition>
  </div>
</template>
           

include 和 exclude 屬性允許元件有條件地緩存,它的值為元件的name,并非路由name屬性 并非路由name屬性 并非路由name屬性

vue使用keep-alive的include 和 exclude屬性,緩存不生效?
vue使用keep-alive的include 和 exclude屬性,緩存不生效?
vue使用keep-alive的include 和 exclude屬性,緩存不生效?