原因是:ts默认初始化空数组为 never[] 类型,跟你赋值的数据类型不匹配

修改为:arr_data: [] as any[],即可

vue3 keep-alive+vuex配合使用(简单易用)

vue3+ts Type ‘xxx[]‘ is not assignable to type ‘never[]‘相关推荐

  1. Type ‘string | null‘ is not assignable to type ‘string‘. Type ‘null‘ is not assignable to type ‘

    报错如下: Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type ...

  2. typescript error TS2322: Type ‘Timeout‘ is not assignable to type ‘number‘.

    源码 const timer:number = setTimeout(()=>{},1) 报错 typescript error TS2322: Type 'Timeout' is not as ...

  3. TS2322 Type ‘void‘ is not assignable to type ‘MouseEventHandlerHTMLElement

    问题:TS2322 Type 'void' is not assignable to type 'MouseEventHandlerHTMLElement 实例: 都是在类似这种"----- ...

  4. Type ‘number‘ is not assignable to type ‘string‘

    document.getElementById('gohanCost').innerHTML = 0; 报错: Type 'number' is not assignable to type 'str ...

  5. 源码解析异常is expected to be of type ‘xxx‘ but was actually of type ‘xxx‘ 是如何发生的

    前言 这篇博客是对[@Resource 源码解析]做的一个补丁.主要会讲解在使用@Resource的时候发生的is expected to be of type 'xxx' but was actua ...

  6. cannot bind non-const lvalue reference of type ‘xxx‘ to an rvalue of type ‘xxx‘

    文章目录 报错代码 报错 原因 解决方案 报错代码 #include<iostream> using namespace std; class Complex{private:double ...

  7. vue3 router.push 传参路由跳转错误提示 Argument type {xxx} is not assignable to parameter type RouteLocationRaw

    文章目录 问题描述 解决方法 问题描述 传参时,router.push中布尔值变量会给出一个错误提示 setup(){const router = useRouter();/** 查看已办任务的流程记 ...

  8. Array type xxx is not assignable

    问题 在 world_type.h里面的struct.species_t也是一个struct. struct world_t {unsigned int numSpecies;species_t sp ...

  9. c++字符串赋值时的错误,如Array type ‘XXX‘ is not assignable

    大二了却在字符串赋值上又犯了错误,简单记录一下. 首先定义了一个学生的结构体 struct Student{double tall;char gender[100];}; 在主函数中我开始是如下定义的 ...

最新文章

  1. python3安装pip3-python3安装pip3的实例步骤
  2. 哪些云计算企业能活下来
  3. Masonry 原理与使用说明
  4. Web前端开发笔记——第三章 CSS语言 第四节 CSS列表、表格样式
  5. 在 .NET Core 5 中集成 Create React app
  6. oracle导入substring,java中substring()和oracle中substr()区别
  7. Android 中的线程有哪些,原理与各自特点
  8. 7-将本地的javaweb项目部署到Linux服务器的一般操作
  9. Python零基础入门学习 作者:小甲鱼
  10. vue基础之v-for,key
  11. python数据分析的概念_Python数据分析入门篇
  12. Mapper method 'org.xxxxmapper.XXXXXMapper.saveXXXX' has an unsupported return type:
  13. 如何利用手机的OCR文字识别功能制作扫描件?
  14. 图像的幅度谱与相位谱
  15. win7 java 开发环境搭建教程_Java开发环境配置教程(win7 64bit)
  16. mysql网络封包读取_项目总结(四)--- 网络封包分析工具Charles
  17. Wireshark文档阅读笔记-TCP Flags
  18. 安卓模拟器的使用--皇室战争免费快速成长之路
  19. IntelliJ IDEA 快捷键 Mac版(个人自用最新版)
  20. html加图标 favicon图标

热门文章

  1. 2014英菲尼迪的万人盛典一线巨星在华演出全程记录
  2. 【深度学习笔记】亚像素 / sub-pixel、亚像素卷积
  3. 计算机三级数据库技术知识点
  4. Vue中使用 class 类样式的方式
  5. Amazon Leadership Principles 亚马逊领导力准则
  6. GIF动画导入到FLASH的应用
  7. 带着萌新看springboot源码02
  8. 2007-2008 火箭赛事时间
  9. 优麒麟linux安装教程,百度网盘Linux版安装指引:搭配优麒麟运行更完美
  10. Dubbo面试专题总结