当前位置:网站首页>关于 Invalid prop: type check failed for prop “index“. Expected String, got Undefined
关于 Invalid prop: type check failed for prop “index“. Expected String, got Undefined
2022-08-05 22:14:00 【铃儿响叮当不响】
使用ElementUI导航组件中循环生成导航过程中

出现如下的警告: Invalid prop: type check failed for prop “index“. Expected String, got Undefined

报错:index字段为字符串格式,后台数据为num格式,格式警告
解决办法:
index="item.path" => index="item.path + ' ' "
使用ElementUI库的index是字符串格式,但是id一般时Number类型的,所以会报错。可以利用+将其他类型的值转化成字符串类型。+' ',将后台数据转换为字符串。

边栏推荐
猜你喜欢
随机推荐
On how to download m3u8/ts videos in web pages
一看就懂的:MySQL的Double Write
SRv6网络典型部署场景
重新定义分析 - EventBridge 实时事件分析平台发布
微信小程序使用Swiper组件实现层叠轮播图
[debian]cockpit 报错Cannot refresh cache whilst offline
机器人课程教师面对的困境有哪些
当你收到面试通知后,通过如下的准备可以大大提升面试成功率
了解MySQL数据页吗?说说什么是页分裂吧!
中国石油大学(北京)-《油气藏经营管理 》在线考试
ROS环境搭建过程
LSN、Checkpoint?MySQL的崩溃恢复是怎么做的?
[Home Assistant]esp32 Bafa cloud access ha
[ssh] Solve the problem that the debian 11 system crt cannot ssh login
IDEA中如何使用debug调试项目 一步一步详细教程
[esp32]esp8266连接小爱同学控制继电器
【Flask】使用gevent部署flask
网页提示此站点不安全,还能打开吗?
Quick Sort
CAN-Oe 通道配置方法









