Commit 6f5ee7ad authored by 陈龙's avatar 陈龙

feat: 时间选择器增加默认visible属性

parent 764f475e
......@@ -16,8 +16,9 @@ const TimeRangePicker = ({
dataSource,
timeProps,
onChange,
defaultVisible
}) => {
const [visible, setVisible] = useState(false);
const [visible, setVisible] = useState(defaultVisible);
const [visibleKey, setVisibleKey] = useState(null);
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
......@@ -104,6 +105,7 @@ TimeRangePicker.defaultProps = {
dataSource: [],
timeProps: {},
onChange: function (v) {},
defaultVisible:false
};
TimeRangePicker.propTypes = {
......@@ -114,6 +116,7 @@ TimeRangePicker.propTypes = {
dataSource: PropTypes.array,
timeProps: PropTypes.object,
onChange: PropTypes.func,
defaultVisible: PropTypes.bool
};
export default TimeRangePicker;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment