Skip to content

Commit 2f0a51a

Browse files
set app default canvas settings
1 parent 557407f commit 2f0a51a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

client/packages/lowcoder/src/comps/comps/appSettingsComp.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { getNpmPackageMeta } from "../utils/remote";
2323
import { getPromiseAfterDispatch } from "@lowcoder-ee/util/promiseUtils";
2424
import type { AppState } from "@lowcoder-ee/redux/reducers";
2525
import { ColorControl } from "../controls/colorControl";
26+
import { DEFAULT_ROW_COUNT } from "@lowcoder-ee/layout/calculateUtils";
2627

2728
const TITLE = trans("appSetting.title");
2829
const USER_DEFINE = "__USER_DEFINE";
@@ -127,6 +128,7 @@ const DivStyled = styled.div`
127128
flex: 0 0 24px;
128129
}
129130
> div:nth-child(2) {
131+
flex: 1;
130132
> div:nth-child(2) {
131133
width: 100%;
132134
}
@@ -212,9 +214,9 @@ const childrenMap = {
212214
maxWidth: dropdownInputSimpleControl(OPTIONS, USER_DEFINE, "1920"),
213215
gridColumns: RangeControl.closed(8, 48, 24),
214216
gridRowHeight: RangeControl.closed(6, 20, 8),
215-
gridRowCount: NumberControl,
216-
gridPaddingX: NumberControl,
217-
gridPaddingY: NumberControl,
217+
gridRowCount: withDefault(NumberControl, DEFAULT_ROW_COUNT),
218+
gridPaddingX: withDefault(NumberControl, 20),
219+
gridPaddingY: withDefault(NumberControl, 20),
218220
gridBg: ColorControl,
219221
gridBgImage: StringControl,
220222
gridBgImageRepeat: StringControl,

0 commit comments

Comments
 (0)