diff --git a/packages/core/client/src/schema-component/antd/gantt/components/calendar/calendar.tsx b/packages/core/client/src/schema-component/antd/gantt/components/calendar/calendar.tsx index f3745164a5..e334c20d53 100644 --- a/packages/core/client/src/schema-component/antd/gantt/components/calendar/calendar.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/components/calendar/calendar.tsx @@ -213,7 +213,8 @@ export const Calendar: React.FC = ({ const dates = dateSetup.dates; for (let i = 0; i < dates.length; i++) { const date = dates[i]; - const bottomValue = `${getLocalDayOfWeek(date, locale, 'short')}, ${date.getDate().toString()}`; + // const bottomValue = `${getLocalDayOfWeek(date, locale, 'short')}, ${date.getDate().toString()}`; + const bottomValue = `${date.getDate().toString()}`; bottomValues.push( = ({ const date = dates[i]; const bottomValue = getCachedDateTimeFormat(locale, { hour: 'numeric', + }) //@ts-ignore - }).format(date); - + .format(date) + .replace('时', ''); bottomValues.push( = ({ const date = dates[i]; const bottomValue = getCachedDateTimeFormat(locale, { hour: 'numeric', + }) //@ts-ignore - }).format(date); - + .format(date) + ?.replace('时', ''); bottomValues.push( { const columnWidth = clientWidth / dataSetLength > 50 ? Math.floor(clientWidth / dataSetLength) + 20 : 50; @@ -58,7 +59,6 @@ export const Gantt: any = (props: any) => { rowHeight = 55.56, ganttHeight = 0, preStepsCount = 1, - locale = 'en-GB', barFill = 60, barCornerRadius = 3, barProgressColor = '#a3a3ff', @@ -89,6 +89,8 @@ export const Gantt: any = (props: any) => { } = props; const { onExpanderClick, tasks, expandAndCollapseAll } = useProps(); const ctx = useGanttBlockContext(); + const appInfo = useCurrentAppInfo(); + const locale = appInfo.data?.lang; const tableCtx = useTableBlockContext(); const { resource, service } = useBlockRequestContext(); const fieldSchema = useFieldSchema();