From 204055c000bbdcb84b6dce0868e80a39b0f91819 Mon Sep 17 00:00:00 2001 From: chenxuan Date: Thu, 18 Apr 2024 16:14:42 +0800 Subject: [PATCH] no message --- chenxuan1/src/pages/props.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chenxuan1/src/pages/props.jsx b/chenxuan1/src/pages/props.jsx index b205aeaaf..3519266a0 100644 --- a/chenxuan1/src/pages/props.jsx +++ b/chenxuan1/src/pages/props.jsx @@ -4,7 +4,7 @@ class Child extends React.Component { static propTypes = { name:PropTypes.string.isRequired, //限制name必传,且为字符串 sex:PropTypes.string,//限制sex为字符串 - age:PropTypes.string,//限制age为数值 + age:PropTypes.number,//限制age为数值 }; static defaultProps = { name: "chenxuan", @@ -24,8 +24,8 @@ class Child extends React.Component { render() { return (
- - {/* */} + {/* */} +
); }