当前位置:   article > 正文

vue iframe {keepAlive}设置不刷新_怎么阻止iframe刷新

怎么阻止iframe刷新
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 }

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
<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>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/188402
推荐阅读
相关标签
  

闽ICP备14008679号