Skip to content

Commit e719522

Browse files
authoredMar 13, 2024··
Merge pull request #754 from cnelf/fix/code-style-standard-and-typo
fix: coding standard and typo
2 parents 8471891 + c14b91a commit e719522

File tree

17 files changed

+166
-165
lines changed

17 files changed

+166
-165
lines changed
 

‎client/packages/lowcoder-design/src/icons/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export { ReactComponent as WidthIcon } from "./icon-width.svg";
290290
export { ReactComponent as ResponsiveLayoutCompIcon } from "./icon-responsive-layout-comp.svg";
291291
export { ReactComponent as TextSizeIcon } from "./remix/font-size-2.svg";
292292
export { ReactComponent as FontFamilyIcon } from "./remix/font-sans-serif.svg";
293-
export { ReactComponent as TextWeigthIcon } from "./remix/bold.svg";
293+
export { ReactComponent as TextWeightIcon } from "./remix/bold.svg";
294294
export { ReactComponent as BorderWidthIcon } from "./remix/expand-width-line.svg";
295295
export { ReactComponent as LeftInfoLine } from "./remix/information-line.svg";
296296
export { ReactComponent as LeftInfoFill } from "./remix/information-fill.svg";

‎client/packages/lowcoder/src/comps/comps/numberInputComp/sliderCompConstants.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const getStyle = (style: SliderStyleType) => {
3030
}
3131
.ant-slider-handle {
3232
background-color: ${style.thumb};
33-
border-color: ${style.thumbBoder};
33+
border-color: ${style.thumbBorder};
3434
}
3535
}
3636
&:hover {
@@ -39,7 +39,7 @@ const getStyle = (style: SliderStyleType) => {
3939
}
4040
}
4141
.ant-slider-handle:focus {
42-
box-shadow: 0 0 0 5px ${fadeColor(darkenColor(style.thumbBoder, 0.08), 0.12)};
42+
box-shadow: 0 0 0 5px ${fadeColor(darkenColor(style.thumbBorder, 0.08), 0.12)};
4343
}
4444
}
4545
`;

‎client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnComp.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
withFunction,
2222
wrapChildAction,
2323
} from "lowcoder-core";
24-
import { AlignClose, AlignLeft, AlignRight, IconRadius, BorderWidthIcon, TextSizeIcon, FontFamilyIcon, TextWeigthIcon, ImageCompIcon, controlItem, Dropdown, OptionType } from "lowcoder-design";
24+
import { AlignClose, AlignLeft, AlignRight, IconRadius, BorderWidthIcon, TextSizeIcon, FontFamilyIcon, TextWeightIcon, ImageCompIcon, controlItem, Dropdown, OptionType } from "lowcoder-design";
2525
import { ColumnTypeComp, ColumnTypeCompMap } from "./columnTypeComp";
2626
import { ColorControl } from "comps/controls/colorControl";
2727
import { JSONValue } from "util/jsonTypes";
@@ -120,7 +120,7 @@ const StyledBorderRadiusIcon = styled(IconRadius)` width: 24px; margin: 0 8px 0
120120
const StyledBorderIcon = styled(BorderWidthIcon)` width: 24px; margin: 0 8px 0 -3px; padding: 3px;`;
121121
const StyledTextSizeIcon = styled(TextSizeIcon)` width: 24px; margin: 0 8px 0 -3px; padding: 3px;`;
122122
const StyledFontFamilyIcon = styled(FontFamilyIcon)` width: 24px; margin: 0 8px 0 -3px; padding: 3px;`;
123-
const StyledTextWeightIcon = styled(TextWeigthIcon)` width: 24px; margin: 0 8px 0 -3px; padding: 3px;`;
123+
const StyledTextWeightIcon = styled(TextWeightIcon)` width: 24px; margin: 0 8px 0 -3px; padding: 3px;`;
124124
const StyledBackgroundImageIcon = styled(ImageCompIcon)` width: 24px; margin: 0 0px 0 -12px;`;
125125

126126
/**
@@ -303,7 +303,7 @@ export class ColumnComp extends ColumnInitComp {
303303
})}
304304
{this.children.textWeight.propertyView({
305305
label: trans('style.textWeight'),
306-
preInputNode: <StyledTextWeightIcon as={TextWeigthIcon} title="" />,
306+
preInputNode: <StyledTextWeightIcon as={TextWeightIcon} title="" />,
307307
placeholder: 'normal',
308308
})}
309309
{this.children.fontFamily.propertyView({

‎client/packages/lowcoder/src/comps/comps/timelineComp/timelineComp.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import {
4646
import { timelineDate, timelineNode, TimelineDataTooltip } from "./timelineConstants";
4747
import { convertTimeLineData } from "./timelineUtils";
4848
import { default as Timeline } from "antd/es/timeline";
49-
import { EditorContext } from "comps/editorState";
49+
import { EditorContext } from "comps/editorState";
5050

5151
const EventOptions = [
5252
clickEvent,
@@ -108,7 +108,7 @@ const TimelineComp = (
108108
color: value?.color,
109109
dot: icons[index] || "",
110110
label: (
111-
<span style={{ color: value?.lableColor || style?.lableColor }}>
111+
<span style={{ color: value?.labelColor || style?.labelColor }}>
112112
{value?.label}
113113
</span>
114114
),

‎client/packages/lowcoder/src/comps/comps/timelineComp/timelineConstants.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export type timelineNode = {
77
dot?: string;
88
subTitleColor?: string;
99
titleColor?: string;
10-
lableColor?: string;
10+
labelColor?: string;
1111
};
1212

1313
export const TimelineDataTooltip = (
@@ -28,7 +28,7 @@ export const TimelineDataTooltip = (
2828
<br />
2929
7. subTitleColor - {trans("timeLine.helpSubTitleColor")}
3030
<br />
31-
8. lableColor - {trans("timeLine.helpLableColor")}
31+
8. labelColor - {trans("timeLine.helpLabelColor")}
3232
</li>
3333
);
3434

@@ -51,7 +51,7 @@ export const timelineDate=[
5151
color: 'red',
5252
titleColor: "red",
5353
subTitleColor: "red",
54-
lableColor: "red",
54+
labelColor: "red",
5555
},
5656
{
5757
title: "Lowcoder 2.0",
@@ -60,4 +60,4 @@ export const timelineDate=[
6060
color: "green",
6161
label: "2023-6-20",
6262
},
63-
]
63+
]

‎client/packages/lowcoder/src/comps/comps/timelineComp/timelineUtils.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function checkDataNodes(value: any, key?: string): timelineNode[] | undefined {
1515
check(node["color"], ["string", "undefined"], "color");
1616
check(node["titleColor"], ["string", "undefined"], "titleColor");
1717
check(node["subTitleColor"], ["string", "undefined"], "subTitleColor");
18-
check(node["lableColor"], ["string", "undefined"], "lableColor");
18+
check(node["labelColor"], ["string", "undefined"], "labelColor");
1919
check(node["dot"], ["string", "undefined"], "dot");
2020
return node;
2121
});

‎client/packages/lowcoder/src/comps/comps/triContainerComp/triContainer.tsx

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import { gridItemCompToGridItems, InnerGrid } from "../containerComp/containerVi
99
import { TriContainerViewProps } from "../triContainerComp/triContainerCompBuilder";
1010

1111
const getStyle = (style: ContainerStyleType) => {
12-
return css`
12+
return css`
1313
border-color: ${style.border};
1414
border-width: ${style.borderWidth};
1515
border-radius: ${style.radius};
1616
overflow: hidden;
17-
padding: ${style.padding};
17+
padding: ${style.padding};
1818
${style.background && `background-color: ${style.background};`}
1919
${style.backgroundImage && `background-image: ${style.backgroundImage};`}
2020
${style.backgroundImageRepeat && `background-repeat: ${style.backgroundImageRepeat};`}
@@ -33,7 +33,7 @@ const Wrapper = styled.div<{ $style: ContainerStyleType }>`
3333
${(props) => props.$style && getStyle(props.$style)}
3434
`;
3535

36-
const HeaderInnerGrid = styled(InnerGrid)<{
36+
const HeaderInnerGrid = styled(InnerGrid)<{
3737
$backgroundColor: string
3838
$headerBackgroundImage: string;
3939
$headerBackgroundImageRepeat: string;
@@ -140,7 +140,7 @@ export function TriContainer(props: TriContainerProps) {
140140
$headerBackgroundImageSize={headerStyle?.headerBackgroundImageSize}
141141
$headerBackgroundImagePosition={headerStyle?.headerBackgroundImagePosition}
142142
$headerBackgroundImageOrigin={headerStyle?.headerBackgroundImageOrigin}
143-
style={{padding: headerStyle.containerheaderpadding}}
143+
style={{padding: headerStyle.containerHeaderPadding}}
144144

145145
/>
146146
</BackgroundColorContext.Provider>
@@ -168,7 +168,7 @@ export function TriContainer(props: TriContainerProps) {
168168
$backgroundImageSize={bodyStyle?.backgroundImageSize}
169169
$backgroundImagePosition={bodyStyle?.backgroundImagePosition}
170170
$backgroundImageOrigin={bodyStyle?.backgroundImageOrigin}
171-
style={{padding: bodyStyle.containerbodypadding}}
171+
style={{padding: bodyStyle.containerBodyPadding}}
172172
/>
173173
</ScrollBar>
174174
) : (
@@ -191,7 +191,7 @@ export function TriContainer(props: TriContainerProps) {
191191
$backgroundImageSize={bodyStyle?.backgroundImageSize}
192192
$backgroundImagePosition={bodyStyle?.backgroundImagePosition}
193193
$backgroundImageOrigin={bodyStyle?.backgroundImageOrigin}
194-
style={{padding: bodyStyle.containerbodypadding}}/>
194+
style={{padding: bodyStyle.containerBodyPadding}}/>
195195
)}
196196
</BackgroundColorContext.Provider>
197197
)}
@@ -214,7 +214,7 @@ export function TriContainer(props: TriContainerProps) {
214214
$footerBackgroundImageOrigin={footerStyle?.footerBackgroundImageOrigin}
215215
$borderColor={style?.border}
216216
$borderWidth={style?.borderWidth}
217-
style={{padding: footerStyle.containerfooterpadding}}
217+
style={{padding: footerStyle.containerFooterPadding}}
218218
/>
219219
</BackgroundColorContext.Provider>
220220
)}

‎client/packages/lowcoder/src/comps/controls/styleControl.tsx

+13-13
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
CompressIcon,
1515
TextSizeIcon,
1616
FontFamilyIcon,
17-
TextWeigthIcon,
17+
TextWeightIcon,
1818
ShowBorderIcon,
1919
BorderWidthIcon,
2020
ImageCompIcon,
@@ -569,7 +569,7 @@ const MarginIcon = styled(ExpandIcon)` margin: 0 8px 0 2px;`;
569569
const PaddingIcon = styled(CompressIcon)` margin: 0 8px 0 2px;`;
570570
const StyledTextSizeIcon = styled(TextSizeIcon)` margin: 0 8px 0 -3px; padding: 3px;`;
571571
const StyledFontFamilyIcon = styled(FontFamilyIcon)` margin: 0 8px 0 -3px; padding: 3px;`;
572-
const StyledTextWeightIcon = styled(TextWeigthIcon)` margin: 0 8px 0 -3px; padding: 3px;`;
572+
const StyledTextWeightIcon = styled(TextWeightIcon)` margin: 0 8px 0 -3px; padding: 3px;`;
573573
const StyledBackgroundImageIcon = styled(ImageCompIcon)` margin: 0 0px 0 -12px;`;
574574

575575
const ResetIcon = styled(IconReset)`
@@ -611,9 +611,9 @@ export function styleControl<T extends readonly SingleColorConfig[]>(colorConfig
611611
name === "footerBackgroundImageOrigin" ||
612612
name === "margin" ||
613613
name === "padding" ||
614-
name === "containerheaderpadding" ||
615-
name === "containerfooterpadding" ||
616-
name === "containerbodypadding"
614+
name === "containerHeaderPadding" ||
615+
name === "containerFooterPadding" ||
616+
name === "containerBodyPadding"
617617
) {
618618
childrenMap[name] = StringControl;
619619
} else {
@@ -657,9 +657,9 @@ export function styleControl<T extends readonly SingleColorConfig[]>(colorConfig
657657
name === "radius" ||
658658
name === "margin" ||
659659
name === "padding" ||
660-
name === "containerheaderpadding" ||
661-
name === "containerfooterpadding" ||
662-
name === "containerbodypadding" ||
660+
name === "containerHeaderPadding" ||
661+
name === "containerFooterPadding" ||
662+
name === "containerBodyPadding" ||
663663
name === "borderWidth" ||
664664
name === "backgroundImage" ||
665665
name === "backgroundImageRepeat" ||
@@ -748,9 +748,9 @@ export function styleControl<T extends readonly SingleColorConfig[]>(colorConfig
748748
placeholder: props[name],
749749
})
750750
: (name === "padding" ||
751-
name === "containerheaderpadding" ||
752-
name === "containerfooterpadding" ||
753-
name === "containerbodypadding")
751+
name === "containerHeaderPadding" ||
752+
name === "containerFooterPadding" ||
753+
name === "containerBodyPadding")
754754
? (
755755
children[name] as InstanceType<typeof StringControl>
756756
).propertyView({
@@ -847,7 +847,7 @@ export function styleControl<T extends readonly SingleColorConfig[]>(colorConfig
847847
: children[name].propertyView({
848848
label: config.label,
849849
panelDefaultColor: props[name],
850-
// isDep: isDepColorConfig(config),
850+
// isDep: isDepColorConfig(config),
851851
isDep: true,
852852
depMsg: depMsg,
853853
})}
@@ -870,4 +870,4 @@ export function useStyle<T extends readonly SingleColorConfig[]>(colorConfigs: T
870870
props[config.name as Names<T>] = "";
871871
});
872872
return calcColors(props, colorConfigs, theme?.theme, bgColor);
873-
}
873+
}

0 commit comments

Comments
 (0)
Please sign in to comment.