如何实现以下操作:1. 去掉tags里的首页 2. 点击tags标签不刷新,关闭tags页面点击左侧菜单栏刷新页面

Saber 未结 1 1685
张小美
张小美 剑者 2020-04-01 15:14

1.图片.png



1条回答
  • 2020-05-22 17:01

    解决点击tabs刷新:

    src\page\index\index.vue

     <div style="height:100%;overflow-y:auto;overflow-x:hidden;" id="avue-view" v-show="!isSearch">
              <keep-alive>
    <!--            <router-view class="avue-view" v-if="$route.meta.$keepAlive"/>-->
                <router-view class="avue-view" v-if="$route.meta.$keepAlive || $route.meta.$keepAlive === undefined"/>
              </keep-alive>
    <!--          <router-view class="avue-view" v-if="!$route.meta.$keepAlive"/>-->
              <router-view class="avue-view" v-if="!$route.meta.$keepAlive && $route.meta.$keepAlive !== undefined"/>
            </div>

    src\page\index\layout.vue

     <div>
        <keep-alive>
    <!--      <router-view class="avue-view" v-if="$route.meta.$keepAlive" />-->
          <router-view class="avue-view" v-if="$route.meta.$keepAlive || $route.meta.$keepAlive === undefined"/>
        </keep-alive>
    <!--    <router-view class="avue-view" v-if="!$route.meta.$keepAlive" />-->
          <router-view class="avue-view" v-if="!$route.meta.$keepAlive && $route.meta.$keepAlive !== undefined"/>
      </div>


    0 讨论(1)
提交回复