vue报错    [Vue warn]: Invalid prop: type check failed for prop "name". Expected String with value "4", got Number with value 4.

当出现这个错误原因在于写法上漏了数字和字符串的类型关系

引用了我们定义的数组和变量或者函数

这个问题就是我们点击:name默认的类型是字符串类型,而我们自己定义的是数字类型所以我们需要改一下就好

希望上述能帮到你

Vue报错 type check failed for prop “xxx“. Expected String with value “xx“,got Number with value ‘xx‘的更多相关文章

  1. vue.esm.js?efeb:628 [Vue warn]: Invalid prop: type check failed for prop "defaultActive". Expected String with value "0", got Number with value 0.

    vue.esm.js?efeb:628 [Vue warn]: Invalid prop: type check failed for prop "defaultActive". ...

  2. Invalid prop: type check failed for prop "XXX". Expected String, got Object.

    项目是Vue的,基于elementUI的后台管理系统. Invalid prop: type check failed for prop "total". Expected Str ...

  3. Vue报错type check failed for prop

    在报错的'value'属性前面加:或者去掉:即可解决问题.

  4. Invalid prop: type check failed for prop "xxx". Expected Number, got String.

    在子组件progress-circle.vue的template中的定义如下: <svg :width="radius" :height="radius" ...

  5. Vue报错之"[Vue warn]: Invalid prop: type check failed for prop "jingzinum". Expected Number with value NaN, got String with value "fuNum"."

    一.报错截图 [Vue warn]: Invalid prop: type check failed for prop "jingzinum". Expected Number w ...

  6. Invalid prop: type check failed for prop "maxlength". Expected Number, got String.

    1.项目中,使用element-ui的input表单的maxlength属性报错 2.使用场景:       <el-input v-model="fname"  maxle ...

  7. [Vue warn]: Invalid prop: type check failed for prop "percentage". Expected Number, got Null

    Vue组件报错 <ElProgress> at packages/progress/src/progress.vue 用了element组件 绑定数据时后端给我们传的参数为null,所以组 ...

  8. [VUE ERROR] Invalid prop: type check failed for prop "list". Expected Array, got Undefined

    错误原因: 子组件 props -> list 要求接收的数据类型是 Array, 然而实际接收到的是 Undefined. 子组件代码: props: { list: { type: Arra ...

  9. vue调用组件,组件回调给data中的数组赋值,报错Invalid prop type check failed for prop value. Expecte

    报错信息: 代码信息:调用一个tree组件,选择一些信息 <componentsTree ref="typeTreeComponent" @treeCheck="t ...

随机推荐

  1. 剑指offer计划19( 搜索与回溯算法中等)---java

    1.1.题目1 剑指 Offer 64. 求1+2+-+n 1.2.解法 这题看评论区真的绝了,都是人才,各个说话都好听,我看到个还有用异常来结束的就离谱. 这题用了&&当左边为fal ...

  2. TP5多条件搜索,同时有必要条件

    $model = $this->model; // 查询是否有搜索参数 $search = input('?get.search') ? trim(input('get.search')) : ...

  3. java中避免集合死链调用

    目录 1. 前言 2. 场景 3. 环境 3.1 开发环境准备 3.2 数据准备 3.2.1 Mysql数据库表及数据 3.2.2 redis库数据 4. 解决方式 5.完整代码 5.1Model 5 ...

  4. Jetpack Compose学习(5)——从登录页美化开始学习布局组件使用

    原文:Jetpack Compose学习(5)--从登录页美化开始学习布局组件使用 | Stars-One的杂货小窝 本篇主要讲解常用的布局,会与原生Android的布局控件进行对比说明,请确保了解A ...

  5. Selenium多浏览器处理 (Chrome/Firefox/IE)

    测试用例文件:test_selenium/test_hogwarts.py 使用pytest框架 定义一个变量,通过外部传入变量,确定使用哪个浏览器 browser = os.getenv(" ...

  6. TP框架中的一些登录代码分享

    <?php namespace Admin\Controller;use Think\Controller;class LoginController extends Controller{ p ...

  7. hadoop生态之面试题篇

    一.hdfs的高可用 1.先说下自己的理解, 正常的hdfs有namenode,datanode,secondnamenode,但是second name node 不是真正意义上的namenode备 ...

  8. 一文彻底掌握Apache Hudi异步Clustering部署

    1. 摘要 在之前的一篇博客中,我们介绍了Clustering(聚簇)的表服务来重新组织数据来提供更好的查询性能,而不用降低摄取速度,并且我们已经知道如何部署同步Clustering,本篇博客中,我们 ...

  9. P3706-[SDOI2017]硬币游戏【高斯消元,字符串hash】

    正题 题目链接:https://www.luogu.com.cn/problem/P3706 题目大意 给出 \(n\) 个长度为 \(m\) 的 \(H/T\) 串. 开始一个空序列,每次随机在后面 ...

  10. P5934-[清华集训2012]最小生成树【最小割】

    正题 题目链接:https://www.luogu.com.cn/problem/P5934 题目大意 给出\(n\)个点\(m\)条边的一张图,再加入一条边\((u,v,L)\)求至少删掉多少条边可 ...