You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
目前效果是,点击某个按钮后可以弹出蒙层,点击蒙层后也可以让蒙层不显示,然而浏览器报错: Warning: Functions are not valid as a React child. This may happen if you return a Component instead of from render. Or maybe you meant to call this function rather than return it. 中文翻译是:函数作为React子级无效。如果从渲染返回Component而不是<Component/>,则可能会发生这种情况。或者您可能打算调用此函数而不是返回它
请问代码出了什么问题?代码的正确的写法是什么?恳请展示代码进行说明,谢谢~
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
使用antd mobile V5.22里的mask背景蒙层
希望实现的效果是,点击某个按钮后弹出蒙层,同时弹出内容框遮住蒙层的一部分
已写的部分代码:
目前效果是,点击某个按钮后可以弹出蒙层,点击蒙层后也可以让蒙层不显示,然而浏览器报错:
Warning: Functions are not valid as a React child. This may happen if you return a Component instead of from render. Or maybe you meant to call this function rather than return it.
中文翻译是:函数作为React子级无效。如果从渲染返回Component而不是<Component/>,则可能会发生这种情况。或者您可能打算调用此函数而不是返回它
请问代码出了什么问题?代码的正确的写法是什么?恳请展示代码进行说明,谢谢~
Beta Was this translation helpful? Give feedback.
All reactions