vue keep-alive和更新数据

<div id="app">
        <!--缓存-->
        <keep-alive>
            <router-view v-if="$route.meta.keepAlive"></router-view>
        </keep-alive>
        <router-view v-if="!$route.meta.keepAlive"></router-view>
        <!--下拉更新数据--><!--        <router-view v-if="isRouterAlive"></router-view> -->
    </div>

怎么把下面的 v-if="isRouterAlive" 给弄到上面去,但上面已经有v-if


qq_遁去的一_1
浏览 1682回答 2
2回答

慕尼黑5688855

<router-view v-if="!$route.meta.keepAlive || isRouteAlive"></router-view>这么不行吗

牧羊人nacy

路由单独命名的视图能不能代替下v-if???
打开App,查看更多内容
随时随地看视频慕课网APP