首页 > 其他 > 详细

Property propDD has no initializer and is not definitely assigned in the constructor

时间:2021-03-03 08:38:29      阅读:164      评论:0      收藏:0      [点我收藏+]

1、object类型

 技术分享图片

 

 

解决方案  

检测报错代码
@Prop() propDD: object;
修改后
方式一
@Prop({ type: Object, default: {} }) propDD: any;
方式二
@Prop() propDD?: object;


2、array类型

 技术分享图片

 

 

解决方案

检测报错代码
@Prop() propF: string[];
@Prop() propG: Array<number>;
修改后
@Prop() propF?: string[];

 

原文链接:https://blog.csdn.net/Tomoe20/article/details/106210357/

Property propDD has no initializer and is not definitely assigned in the constructor

原文:https://www.cnblogs.com/starof/p/14472369.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!