问题:

我们使用判断时  有时候会报错

        <router-view v-slot="{ Component }"><keep-alive ><component :is="Component" v-if="$route.meta.keepAlive" /></keep-alive><component :is="Component"  v-if="!$route.meta.keepAlive" /></router-view>//keepAlive是在路由里边定义的meta字段 true/false

解决:

这个时候我们只需在  <component> 标签上添加  :key=" 唯一值"  就可以解决了,只要是唯一的就可以没有指定要求 推荐使用 $route.name

        <router-view v-slot="{ Component }"><keep-alive ><component :is="Component" :key="$route.name" v-if="$route.meta.keepAlive" /></keep-alive><component :is="Component" :key="$route.name" v-if="!$route.meta.keepAlive" /></router-view>

VUE3 keep-alive页面切换报错:parentComponent.ctx.deactivate is not a function相关推荐

  1. maven WEB项目启动没问题访问页面就报错:org.apache.jasper.JasperException: Unable to compile class for JSP

    idea 通过maven插件创建一个WEB项目通过内嵌Tomcat加载项目,启动没问题,一访问页面就报错提示无法将jsp编译为class文件: HTTP Status 500 - type Excep ...

  2. 普通的Spring Web项目正常启动,在访问某些JSP页面时,页面会报错 http://java.sun.com/jsp/jstl/core

    问题描述:普通的Spring Web项目正常启动,但是在访问某些JSP页面时,页面会报错出现:org.apache.jasper.JasperException: The absolute uri: ...

  3. webpack高级运用,historyApiFallback(解决history,h5路由,方式刷新页面可能会报错),output中添加publicPath(公共路径)任意找不到的路径都会去访问/等等

    webpack高级应用篇: source-map: 提升开发效率与完善团队开发规范 development环境里配置devtool就可以开启webpackk-source-map(webpack中已经 ...

  4. 使用TS+vue3封装axios时编译报错,提示You may need an additional loader to handle the result of these loaders.

    基于vue3+TS构建的商城后台管理系统 根据coderwhy老师指导搭建的项目为PC端商品后台管理系统. 报错: 使用TS+vue3封装axios时编译报错,提示You may need an ad ...

  5. Vue3运行源码-调试报错:Command failed with exit code 128: git rev-parse HEAD

    Vue3运行源码-调试报错:Command failed with exit code 128: git rev-parse HEAD 下载源码 运行源码 运行源码报错 成功运行 下载源码 官网下载源 ...

  6. PHP连接MySQL报错:Fatal error: Call to undefined function mysql_connect()之解决方法

    来源:http://www.blogjava.net/koradji/articles/336713.html [问题描述] PHP测试连接MySQL的程序如下: <?php $host='lo ...

  7. 运行php代码报错如下Uncaught Error: Call to undefined function curl_init()

    运行php代码报错如下Uncaught Error: Call to undefined function curl_init() 前提要配置好php环境变量,cmd执行php -m查看模块信息 缺少 ...

  8. layui报错Uncaught TypeError: tree is not a function

    layui报错Uncaught TypeError: tree is not a function tree({ elem: "#classtree" , data: data , ...

  9. JavaScript报错:xxx.filter is not a function

    问题 JavaScript报错:xxx.filter is not a function 解决办法 将xxx改为数组类型,filter只支持数组过滤 let xxx = [ { }, { } ]

  10. vue-cil 浏览器控制台报错:this._init is not a function

    vue-cil 浏览器控制台报错:this._init is not a function 今天说一下 this._init is not a function 的报错,这个不会影响界面显示问题,除非 ...

最新文章

  1. python3-pwntools教程_python的pwntools工具的日常使用
  2. My view towards Machine Learning
  3. Python 字典(Dictionary)
  4. 在 Ubuntu 14.04 Chrome中安装Flash Player(转)
  5. 企业云桌面-07-安装虚拟机-001-Win701
  6. 访谈|在网络世界捕获威胁的猎人
  7. 计算机科学课程体系核心内容,计算机科学教育的课程体系之研究
  8. Android Studio查找错误原因
  9. BZOJ 2733: [HNOI2012]永无乡 启发式合并treap
  10. js休眠5秒_JS 之秒开方案大全
  11. Introduction to SAP CPI
  12. [MAC 苹果电脑] [Linux 系统] ”苹果电脑使用虚拟机安装 Linux Ubuntu系统”教程
  13. PR——轨道遮罩-玻璃滑动效果
  14. 职场上个人的核心技术_五年老员工被空降领导要求交出核心技术,拒绝后,隔天上班懵了...
  15. Java 输出三角形
  16. 划分离散数学定义_《离散数学》学习记录 - 集合论
  17. 百度Q3财报公布,O2O转型志在必得
  18. springboot毕设项目酒店管理系统g72sp(java+VUE+Mybatis+Maven+Mysql)
  19. transforms.Compose和transforms.ToTensor()
  20. 单机版Fate安装教程(含虚拟机搭建)

热门文章

  1. 自动关机win10_如何设置电脑自动关机
  2. C/C++中va_start/va_arg/va_end函数源码文件位置及实现原理
  3. 龙须酥nbsp;[我的饮食情节#9352;]
  4. java 生成2位随机数_java生成随机数保留数点后两位
  5. java 批量爬虫_签名图片一键批量生成 使用Java的Webmagic爬虫实现
  6. Gentoo 教程:基本系统安装
  7. Android11.0 默认开启WLAN热点设置默认热点名称和密码
  8. Unity - Timeline 之 Timeline window(Timeline窗口)
  9. Insert Guest Additions CD image 没有反应
  10. PocketPC中汉字输入法分析与实现(…