fix: calender failed to change view for week (#3602)

This commit is contained in:
katherinehhh 2024-03-05 16:34:10 +08:00 committed by GitHub
parent 26432ec84c
commit 03e47a04ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -184,9 +184,9 @@ export const Calendar: any = observer(
const components = useMemo(() => { const components = useMemo(() => {
return { return {
toolbar: (props) => <Toolbar {...props} showLunar={showLunar}></Toolbar>, toolbar: (props) => <Toolbar {...props} showLunar={showLunar}></Toolbar>,
week: { // week: {
header: (props) => <Header {...props} type="week" showLunar={showLunar}></Header>, // header: (props) => <Header {...props} type="week" showLunar={showLunar}></Header>,
}, // },
month: { month: {
dateHeader: (props) => <Header {...props} showLunar={showLunar}></Header>, dateHeader: (props) => <Header {...props} showLunar={showLunar}></Header>,
}, },
@ -217,7 +217,6 @@ export const Calendar: any = observer(
noEventsInRange: i18nt('None'), noEventsInRange: i18nt('None'),
showMore: (count) => i18nt('{{count}} more items', { count }), showMore: (count) => i18nt('{{count}} more items', { count }),
}; };
return wrapSSR( return wrapSSR(
<div className={`${hashId} ${containerClassName}`} style={{ height: fixedBlock ? '100%' : 700 }}> <div className={`${hashId} ${containerClassName}`} style={{ height: fixedBlock ? '100%' : 700 }}>
<GlobalStyle /> <GlobalStyle />