mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
feat: gantt adapt to compact themes
This commit is contained in:
parent
64b3618d05
commit
adb4a9c7bd
@ -54,10 +54,11 @@ const GanttRecordViewer = (props) => {
|
||||
};
|
||||
export const Gantt: any = (props: any) => {
|
||||
const { designable } = useDesignable();
|
||||
const currentTheme = localStorage.getItem('NOCOBASE_THEME');
|
||||
const {
|
||||
headerHeight = designable ? 64 : 55,
|
||||
headerHeight = currentTheme === 'compact' ? (designable ? 52 : 45) : designable ? 64 : 55,
|
||||
listCellWidth = '155px',
|
||||
rowHeight = 55.56,
|
||||
rowHeight = currentTheme === 'compact' ? 45 : 55.56,
|
||||
ganttHeight = 0,
|
||||
preStepsCount = 1,
|
||||
barFill = 60,
|
||||
@ -129,7 +130,7 @@ export const Gantt: any = (props: any) => {
|
||||
useEffect(() => {
|
||||
tableCtx.field.onExpandClick = handleTableExpanderClick;
|
||||
tableCtx.field.onRowSelect = handleRowSelect;
|
||||
tableCtx.setExpandFlag(true)
|
||||
tableCtx.setExpandFlag(true);
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
expandAndCollapseAll?.(!expandFlag);
|
||||
|
@ -10,7 +10,7 @@ export const gridHeightRow = css`
|
||||
|
||||
export const gridRowLine = css`
|
||||
stroke: #f0f0f0;
|
||||
stroke-width:1;
|
||||
stroke-width:1.5;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
`;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user