mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-08 23:19:26 +08:00
style: calendar style improve
This commit is contained in:
parent
62888dcfc1
commit
87e66ecc4d
@ -213,7 +213,8 @@ export const Calendar: React.FC<CalendarProps> = ({
|
||||
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(
|
||||
<text
|
||||
@ -254,9 +255,10 @@ export const Calendar: React.FC<CalendarProps> = ({
|
||||
const date = dates[i];
|
||||
const bottomValue = getCachedDateTimeFormat(locale, {
|
||||
hour: 'numeric',
|
||||
})
|
||||
//@ts-ignore
|
||||
}).format(date);
|
||||
|
||||
.format(date)
|
||||
.replace('时', '');
|
||||
bottomValues.push(
|
||||
<text
|
||||
key={date.getTime()}
|
||||
@ -299,9 +301,10 @@ export const Calendar: React.FC<CalendarProps> = ({
|
||||
const date = dates[i];
|
||||
const bottomValue = getCachedDateTimeFormat(locale, {
|
||||
hour: 'numeric',
|
||||
})
|
||||
//@ts-ignore
|
||||
}).format(date);
|
||||
|
||||
.format(date)
|
||||
?.replace('时', '');
|
||||
bottomValues.push(
|
||||
<text
|
||||
key={date.getTime()}
|
||||
|
@ -9,6 +9,7 @@ export const calendarBottomText = css`
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
pointer-events: none;
|
||||
font-size: 11px;
|
||||
`;
|
||||
|
||||
export const calendarTopTick = css`
|
||||
|
@ -21,6 +21,7 @@ import { ActionContext } from '../../../action';
|
||||
import { useDesignable } from '../../../../../schema-component';
|
||||
import { useBlockRequestContext, useTableBlockContext, useGanttBlockContext } from '../../../../../block-provider';
|
||||
import { RecordProvider } from '../../../../../record-provider';
|
||||
import { useCurrentAppInfo } from '../../../../../appInfo';
|
||||
|
||||
const getColumnWidth = (dataSetLength: any, clientWidth: any) => {
|
||||
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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user