1、刚开始,我是用第一种方式。通过一个变量,来设置必填属性的提示值
显示是没有问题的。
但是点击ModalForm 确认按钮时,报错
Objects are not valid as a React child (found: object with keys {requiredMsg}). If you meant to render a collection of children, use an array instead.
解决:
最后将message 换回固定的写法,就没有问题了!
标签:meant,use,必填,render,React,array,children From: https://www.cnblogs.com/wwssgg/p/18101244