vue iframe {keepAlive}设置不刷新

vue iframe {keepAlive}设置不刷新
Router.js中

import Vue from 'vue'
import VueRouter from 'vue-router'
//登录
import Login from '../views/login/login.vue'
//注册
import Register from '../views/register/register.vue'
import Home from '../views/home/home.vue'
//欢迎页重定向到首页
import Welcome from '../components/welcome.vue'
//疫苗信息管理
import Vaccinemanagement from '../views/vaccinemanagement/vaccinemanagement.vue'
//预约信息管理
import Bookingmanagement from '../views/bookingmanagement/bookingmanagement.vue' 
 //接种记录管理
import Inoculationmanagement from '../views/inoculationmanagement/inoculationmanagement.vue'
//个人中心
import Personalcenter from '../views/personalcenter/personalcenter.vue' 
//用户管理
import Usermanagement from '../views/usermanagement/usermanagement.vue' 
//预约管理
import Vaccinereservation from '../views/vaccinereservation/vaccinereservation.vue' 
//我的预约
import Myreservation from '../views/myreservation/myreservation.vue' 
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    meta: {
      showMenu: false,
      title: '登录',
      notCache: true,
    },
    component: Login
  },
  {
    path: '/register',
    component: Register
  },
  {
    path: '/home',
    component: Home,
    redirect: '/Welcome',
    meta: {
      showMenu: false,
      title: '首页',
      notCache: true,
      icon: 'el-icon-house',
    },
    children: [{
      path: '/Welcome',
      meta: {
        showMenu: true,
        title: '首页',
        // notCache: true,
        icon: 'el-icon-house',
        showIframe:true,
      },
      component: Welcome,
    },
    {
      path: '/vaccinemanagement',
      meta: {
        showMenu: true,
        title: '疫苗信息管理',
        notCache: true,
        icon: 'el-icon-s-operation',

      },
      component: Vaccinemanagement
    },
    {
      path: '/bookingmanagement',
      meta: {
        showMenu: true,
        title: '预约信息管理',
        notCache: true,
        icon: 'el-icon-document-add',
      },
      component: Bookingmanagement
    },
    {
      path: '/myreservation',
      meta: {
        showMenu: true,
        title: '我的预约',
        notCache: true,
        icon: 'el-icon-date',
      },
      component: Myreservation
    },
    {
      path: '/inoculationmanagement',
      meta: {
        showMenu: true,
        title: '接种记录管理',
        notCache: true,
        icon: 'el-icon-document',
      },
      component: Inoculationmanagement
    },
    {
      path: '/vaccinereservation',
      meta: {
        showMenu: true,
        title: '新增预约',
        notCache: true,
        icon: 'el-icon-circle-plus',
      },
      component: Vaccinereservation
    },
    {
      path: '/personalcenter',
      meta: {
        showMenu: true,
        title: '个人中心',
        notCache: true,
        icon: 'el-icon-user',
      },
      component: Personalcenter
    },
    {
      path: '/usermanagement',
      meta: {
        showMenu: true,
        title: '用户管理',
        notCache: true,
        icon: 'el-icon-setting',
      },
      component: Usermanagement
    },
    ],  
  },  
]

const router = new VueRouter({
  routes
})


export default router
export { routes }

<template>
    <div class="home">
        <el-container>
            <el-header>
                <div>
                    <img src="" alt="">
                    <span>疫苗预约系系统</span>
                </div>
                <el-button type="info" @click="logout">退出</el-button>
            </el-header>
            <el-container>
                <!-- 左侧菜单 -->
                <el-aside width="200px">
                    <menu-form></menu-form>
                </el-aside>
                <!-- 右侧内容 -->
                <el-main>
                    <bread-crumb></bread-crumb>
                    <!-- 路由占位符 -->
                    <router-view></router-view>
                    <iframe src="static/homchart.html" v-show="$route.meta.showIframe" class="iframeCard"></iframe>
                </el-main>
            </el-container>
        </el-container>
    </div>
</template>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值