Skip to content

Commit 2260bdb

Browse files
fix: bug fixes
1 parent 9eb33af commit 2260bdb

File tree

4 files changed

+26
-13
lines changed

4 files changed

+26
-13
lines changed

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

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { sameTypeMap, UICompBuilder, withDefault } from "comps/generators";
1616
import { addMapChildAction } from "comps/generators/sameTypeMap";
1717
import { NameConfigHidden, withExposingConfigs } from "comps/generators/withExposing";
1818
import { NameGenerator } from "comps/utils";
19-
import { Section, sectionNames } from "lowcoder-design";
19+
import { Section, controlItem, sectionNames } from "lowcoder-design";
2020
import { HintPlaceHolder } from "lowcoder-design";
2121
import _ from "lodash";
2222
import React from "react";
@@ -85,6 +85,7 @@ const ColumnContainer = (props: ColumnContainerProps) => {
8585
{...props}
8686
emptyRows={15}
8787
hintPlaceholder={HintPlaceHolder}
88+
radius={props.style.radius}
8889
style={props.style}
8990
/>
9091
);
@@ -125,7 +126,7 @@ const ResponsiveLayout = (props: ResponsiveLayoutProps) => {
125126
margin: !_.isEmpty(column.margin) ? column.margin : columnStyle.margin,
126127
padding: !_.isEmpty(column.padding) ? column.padding : columnStyle.padding,
127128
radius: !_.isEmpty(column.radius) ? column.radius : columnStyle.radius,
128-
border: !_.isEmpty(column.border) ? column.border : columnStyle.border,
129+
border: `1px solid ${!_.isEmpty(column.border) ? column.border : columnStyle.border}`,
129130
background: !_.isEmpty(column.background) ? column.background : columnStyle.background,
130131
}
131132
const noOfColumns = columns.length;
@@ -181,15 +182,15 @@ export const ResponsiveLayoutBaseComp = (function () {
181182
})}
182183
{children.autoHeight.getPropertyView()}
183184
</Section>
184-
<Section name={sectionNames.layout}>
185+
<Section name={trans("responsiveLayout.rowLayout")}>
185186
{children.rowBreak.propertyView({
186187
label: trans("responsiveLayout.rowBreak")
187188
})}
188-
{children.matchColumnsHeight.propertyView({
189-
label: trans("responsiveLayout.matchColumnsHeight")
190-
})}
191-
</Section>
192-
<Section name={trans("responsiveLayout.columnsPerRow")}>
189+
{controlItem({}, (
190+
<div style={{marginTop: '8px'}}>
191+
{trans("responsiveLayout.columnsPerRow")}
192+
</div>
193+
))}
193194
{children.columnPerRowLG.propertyView({
194195
label: trans("responsiveLayout.desktop")
195196
})}
@@ -200,7 +201,15 @@ export const ResponsiveLayoutBaseComp = (function () {
200201
label: trans("responsiveLayout.mobile")
201202
})}
202203
</Section>
203-
<Section name={trans("responsiveLayout.columnsSpacing")}>
204+
<Section name={trans("responsiveLayout.columnsLayout")}>
205+
{children.matchColumnsHeight.propertyView({
206+
label: trans("responsiveLayout.matchColumnsHeight")
207+
})}
208+
{controlItem({}, (
209+
<div style={{marginTop: '8px'}}>
210+
{trans("responsiveLayout.columnsSpacing")}
211+
</div>
212+
))}
204213
{children.horizontalSpacing.propertyView({
205214
label: trans("responsiveLayout.horizontal")
206215
})}

client/packages/lowcoder/src/comps/controls/optionsControl.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,8 @@ const ColumnOption = new MultiCompBuilder(
573573
backgroundImage: withDefault(StringControl, ""),
574574
border: withDefault(ColorControl, ""),
575575
radius: withDefault(RadiusControl, ""),
576-
margin: withDefault(StringControl, "0px"),
577-
padding: withDefault(StringControl, "0px"),
576+
margin: withDefault(StringControl, ""),
577+
padding: withDefault(StringControl, ""),
578578
},
579579
(props) => props
580580
)

client/packages/lowcoder/src/i18n/locales/en.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2517,7 +2517,7 @@ export const en = {
25172517
column: "Columns",
25182518
atLeastOneColumnError: "Responsive layout keeps at least one Column",
25192519
columnsPerRow: "Columns per Row",
2520-
columnsSpacing: "Columns Spacing(px)",
2520+
columnsSpacing: "Columns Spacing (px)",
25212521
horizontal: "Horizontal",
25222522
vertical: "Vertical",
25232523
mobile: "Mobile",
@@ -2528,5 +2528,7 @@ export const en = {
25282528
minWidth: "Min. Width",
25292529
rowBreak: "Row Break",
25302530
matchColumnsHeight: "Match Columns Height",
2531+
rowLayout: "Row Layout",
2532+
columnsLayout: "Columns Layout",
25312533
},
25322534
};

client/packages/lowcoder/src/i18n/locales/zh.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2507,7 +2507,7 @@ timeLine: {
25072507
column: "列",
25082508
atLeastOneColumnError: "响应式布局至少保留一列",
25092509
columnsPerRow: "每行列数",
2510-
columnsSpacing: "列间距(px)",
2510+
columnsSpacing: "列间距 (px)",
25112511
horizontal: "水平的",
25122512
vertical: "垂直的",
25132513
mobile: "移动的",
@@ -2518,6 +2518,8 @@ timeLine: {
25182518
minWidth: "分钟。宽度",
25192519
rowBreak: "断行",
25202520
matchColumnsHeight: "匹配列高度",
2521+
rowLayout: "行布局",
2522+
columnsLayout: "栏目布局",
25212523
}
25222524
};
25232525

0 commit comments

Comments
 (0)