解决前端警告: Warning: Failed prop type: Invalid prop value of type number supplied to Textinput
Warning: Failed prop type: Invalid prop value of type number supplied to Textinput, expected string
使用antd-design-React 前端框架渲染Select.Option时,数据从父组件传下来,没次都报上面的警告,而且,只有第二个能正常显示,
<Select defaultValue=record.defaultLink style={{ width: 120 }} bordered={false}><Option value=1>是</Option><Option value=0>否</Option>
</Select>
<Select defaultValue=record.linkStatus style={{ width: 120 }} bordered={false}><Option value=1>有效</Option><Option value=0>无效</Option>
</Select>
而这个警告的意思就是你应该用字符串来传递所需数据,而不是数字。这时将数据包装一下在传递就OK了
record.defaultLink = `${record.defaultLink}`
record.linkStatus = `${record.linkStatus}`
将数据包装后再传递下去使用就正常了
解决前端警告: Warning: Failed prop type: Invalid prop value of type number supplied to Textinput相关推荐
- Warning: Failed prop type: Invalid prop `enablesReturnKeyAutomatically` of type `string` supplie
之前碰到过这个问题,返回值自动匹配失败,前端传数据给后台,后台接受时发现请求数据类型和需要的数据类型不能自动匹配,然后出现这个问题. 仔细让前后台数据类型一致,该问题解决
- 解决springboot警告WARNING: All illegal access operations will be denied in a future release
一.问题描述 WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective acce ...
- 【vue警告坑】 Invalid prop: type check failed for prop resultChild. Expected Object, got String with v
[Vue warn]: Invalid prop: type check failed for prop "resultChild". Expected Object, got ...
- Invalid prop: type check failed for prop “total“. Expected Number with value x, got String with valu
一.问题 在做vue项目分页功能中,出现了Invalid prop: type check failed for prop "total". Expected Number wit ...
- vue: Invalid prop: type check failed for prop “action“. Expected String with valu
出现 Invalid prop: type check failed for prop "action". Expected String with value错误 原因:使用el ...
- Invalid prop: type check failed for prop “total“. Expected Number with value 0, got String with valu
Invalid prop: type check failed for prop "total". Expected Number with value 0, got String ...
- keil5报警告warning:implicit declaration ‘xxxxxxxx’ is invalid in C99 大部分解决办法
keil5报警告warning:implicit declaration 'xxxxxxxx' is invalid in C99 大部分解决办法 我遇到这个问题是在RM战队调裁判系统的时候遇到的. ...
- Invalid prop: custom validator check failed for prop “pagination“.
问题描述 vue 项目使用 antd vue 的表格组件,控制台报错 Invalid prop: custom validator check failed for prop "pagina ...
- webpack-internal:///./node_modules/vue/dist/vue.esm.js:629 [Vue warn]: Invalid prop: type check fail
二级标题webpack-internal:///./node_modules/vue/dist/vue.esm.js:629 [Vue warn]: Invalid prop: type check ...
最新文章
- Horizon6.2.0批量部署XP虚拟机
- json 是个什么东西?
- Linux设置默认Python版本
- python查看方法作用_python学习笔记1,新手小白也能看得懂
- 【MyBatis使用】mapper.xml 中特殊符号的 2 种处理方法(CDATA区+替代字符举例)
- sklearn预处理转化流水线
- 洛谷——P1033 自由落体
- c语言字符串倒置,单词倒置,用C++实现,将一句话里的单词进行倒置的方法详解
- 功能Java示例 第7部分–将失败也视为数据
- Python __getattr__和__setattr__方法介绍
- 傲腾服务器系统,英特尔傲腾:加速智能新常态,驱动存储新未来
- 2022年计算机二级考试Access数据库程序设计冲刺题及答案
- 自定义 Chrome (谷歌浏览器) 主题
- oracle表示大于等于,这些基础请记住,java转义的问题:小于等于、 大于等于Mybatis 、oracle...
- Sphinx 基础教程
- Laravel 以ElasticSearch的方式使用scout
- 计算机考试准考证上的照片格式错了怎么办
- 驾驶员理论考试通过!
- md语法语法_PHP –语法概述
- <机器学习>支持向量机(SVM)理论