阅读 42

vue-template-admin路由跳转不会整个页面都加载

路由跳转不会整个页面都加载

<keep-alive :include="cachedViews" v-if="key.includes('perFormance')||key.includes('testAnalyse')||key.includes('studentMark')">
      <router-view :key="key" />
    </keep-alive>
复制代码

完整代码

<template>
  <section class="app-main" :class="{'no-padl-padr': key === '/examManagement/signAnswerSheet','no-padl-padr': key === '/paperManage/subjectCorrect'}">
    <keep-alive :include="cachedViews" v-if="key.includes('perFormance')||key.includes('testAnalyse')||key.includes('studentMark')">
      <router-view :key="key" />
    </keep-alive>
    <transition name="fade-transform" mode="out-in" :css="!isAnimate" v-else>
      <keep-alive :include="cachedViews">
        <router-view :key="key" />
      </keep-alive>
    </transition>
    <BackToTop />
  </section>
</template>
复制代码

image.png

文章分类
前端
文章标签