Skip to content

Commit ff17063

Browse files
upgrade antd version
1 parent 848d786 commit ff17063

File tree

19 files changed

+293
-234
lines changed

19 files changed

+293
-234
lines changed

client/packages/lowcoder-design/src/components/CustomModal.tsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ function CustomModalRender(props: CustomModalProps & ModalFuncProps) {
227227
/>
228228
</ModalHeaderWrapper>
229229

230-
<div style={{ padding: "0 16px", ...props.bodyStyle }}>{props.children}</div>
230+
<div style={{ padding: "0 16px", ...props.styles?.body }}>{props.children}</div>
231231

232232
{props.footer === null || props.footer ? (
233233
props.footer
@@ -280,13 +280,15 @@ CustomModal.confirm = (props: {
280280
...DEFAULT_PROPS,
281281
okText: trans("ok"),
282282
cancelText: trans("cancel"),
283-
bodyStyle: {
284-
fontSize: "14px",
285-
color: "#333333",
286-
lineHeight: "22px",
287-
minHeight: "72px",
288-
marginTop: "24px",
289-
},
283+
styles: {
284+
body: {
285+
fontSize: "14px",
286+
color: "#333333",
287+
lineHeight: "22px",
288+
minHeight: "72px",
289+
marginTop: "24px",
290+
}
291+
}
290292
};
291293
// create model
292294
const model = modalInstance.confirm({
@@ -321,7 +323,12 @@ CustomModal.confirm = (props: {
321323
title={title}
322324
okButtonType={props.confirmBtnType}
323325
okText={props.okText}
324-
bodyStyle={{ ...defaultConfirmProps.bodyStyle, ...props.bodyStyle }}
326+
styles={{
327+
body: {
328+
...defaultConfirmProps.styles?.body,
329+
...props.bodyStyle,
330+
}
331+
}}
325332
footer={props.footer}
326333
width={props.width}
327334
/>

client/packages/lowcoder-design/src/components/Modal/index.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function Modal(props: ModalProps) {
3232
resizeHandles,
3333
width: modalWidth,
3434
height: modalHeight,
35-
bodyStyle,
35+
styles,
3636
children,
3737
...otherProps
3838
} = props;
@@ -53,7 +53,12 @@ export function Modal(props: ModalProps) {
5353
return (
5454
<AntdModal
5555
width={width ?? modalWidth}
56-
bodyStyle={{ height: height ?? modalHeight, ...bodyStyle }}
56+
styles={{
57+
body: {
58+
height: height ?? modalHeight,
59+
...styles?.body,
60+
}
61+
}}
5762
{...otherProps}
5863
>
5964
<Resizable

client/packages/lowcoder-design/src/components/toolTip.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ function ToolTipLabel(
188188
placement="top"
189189
defaultOpen={false}
190190
trigger="hover"
191-
popupVisible={!!title}
192191
style={tooltipStyle}
193192
{...restProps}
194193
>

client/packages/lowcoder/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"agora-rtc-sdk-ng": "^4.19.0",
4141
"agora-rtm-sdk": "^1.5.1",
4242
"ali-oss": "^6.17.1",
43-
"antd": "5.7.2",
43+
"antd": "^5.12.2",
4444
"antd-img-crop": "^4.12.2",
4545
"axios": "^0.21.1",
4646
"buffer": "^6.0.3",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export function resolveParsedValue(files: UploadFile[]) {
210210
.then((a) => {
211211
const ext = mime.getExtension(f.originFileObj?.type ?? "");
212212
if (ext === "xlsx" || ext === "csv") {
213-
const workbook = XLSX.read(a, { raw: true });
213+
const workbook = XLSX.read(a, { raw: true, codepage: 65001 });
214214
return XLSX.utils.sheet_to_json(workbook.Sheets[workbook.SheetNames[0]], {
215215
raw: false,
216216
});

client/packages/lowcoder/src/comps/comps/formComp/createForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ export const CreateForm = (props: { onCreate: CreateHandler }) => {
669669
onCancel={() => setVisible(false)}
670670
width="600px"
671671
children={<CreateFormBody {...props} />}
672-
bodyStyle={{ padding: 0 }}
672+
styles={{ body: {padding: 0} }}
673673
/>
674674
</div>
675675
</>

client/packages/lowcoder/src/comps/comps/meetingComp/videoMeetingControllerComp.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,9 +508,11 @@ let MTComp = (function () {
508508
: {}
509509
}
510510
contentWrapperStyle={{ maxHeight: "100%", maxWidth: "100%" }}
511-
bodyStyle={{
512-
padding: 0,
513-
backgroundColor: props.style.background,
511+
styles={{
512+
body: {
513+
padding: 0,
514+
backgroundColor: props.style.background,
515+
}
514516
}}
515517
closable={false}
516518
placement={props.placement}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ export const LabelControl = (function () {
178178
}}
179179
placement="top"
180180
color="#2c2c2c"
181-
popupVisible={!!props.tooltip}
182181
getPopupContainer={(node: any) => node.closest(".react-grid-item")}
183182
>
184183
<Label border={!!props.tooltip}>{props.text}</Label>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function ModalConfigView(props: {
6565
onCancel={onCancel}
6666
getContainer={() => document.querySelector(`#${CanvasContainerID}`) || document.body}
6767
footer={null}
68-
bodyStyle={{ padding: "0" }}
68+
styles={{ body: {padding: "0"} }}
6969
zIndex={Layers.modal}
7070
modalRender={(node) => (
7171
<ModalStyled $background={background} onClick={() => {}}>

client/packages/lowcoder/src/comps/hooks/drawerComp.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,12 @@ let TmpDrawerComp = (function () {
127127
onResizeStop={onResizeStop}
128128
rootStyle={props.visible.value ? { overflow: "auto", pointerEvents: "auto" } : {}}
129129
contentWrapperStyle={{ maxHeight: "100%", maxWidth: "100%" }}
130-
bodyStyle={{ padding: 0, backgroundColor: props.style.background }}
130+
styles={{
131+
body: {
132+
padding: 0,
133+
backgroundColor: props.style.background
134+
}
135+
}}
131136
closable={false}
132137
placement={props.placement}
133138
open={props.visible.value}

client/packages/lowcoder/src/comps/hooks/modalComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ let TmpModalComp = (function () {
113113
focusTriggerAfterClose={false}
114114
getContainer={() => document.querySelector(`#${CanvasContainerID}`) || document.body}
115115
footer={null}
116-
bodyStyle={bodyStyle}
116+
styles={{body: bodyStyle}}
117117
width={width}
118118
onCancel={(e) => {
119119
props.visible.onChange(false);

client/packages/lowcoder/src/pages/common/copyModal.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ export function CopyModal(props: CopyModalProps) {
3131
)?.folderId || ""
3232
);
3333
const { visible, close, name, type, id } = props;
34-
34+
const appName = name.length > 25 ? `${name.substring(0, 25)}...` : name;
35+
3536
return (
3637
<CustomModal
37-
title={trans("home.copyModalTitle", { name })}
38+
title={trans("home.copyModalTitle", {name: appName})}
3839
open={visible}
3940
okButtonProps={{ disabled: !copyName }}
4041
destroyOnClose={true}

client/packages/lowcoder/src/pages/datasource/datasourceList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const DatasourceList = () => {
109109
return (
110110
<DatasourceWrapper>
111111
<StepModal
112-
open={isCreateFormShow}
112+
open={isCreateFormShow}
113113
onCancel={() => showCreateForm(false)}
114114
activeStepKey={"type"}
115115
destroyOnClose={true}

client/packages/lowcoder/src/pages/editor/LeftContent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ function toDataView(value: any, name: string, desc?: ReactNode) {
6464
} else if (_.isPlainObject(value)) {
6565
return <CollapseView name={name} desc={descRecord} data={value} key={name} />;
6666
}
67+
6768
return (
6869
<PadDiv key={name}>
69-
<Tooltip title={desc} placement={"right"} popupVisible={!!desc}>
70+
<Tooltip title={desc} placement={"right"}>
7071
<Label label={name} />
7172
&#8203;
7273
</Tooltip>
@@ -150,7 +151,6 @@ const CollapseView = React.memo(
150151
<Tooltip
151152
title={props.desc?.[props.name]}
152153
placement={"right"}
153-
popupVisible={!!props.desc?.[props.name]}
154154
>
155155
<CollapseTitleWrapper onClick={() => props.onClick && props.onClick(props.name)}>
156156
<Title

client/packages/lowcoder/src/pages/editor/bottom/BottomMetaDrawer.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,13 @@ export default function BottomMetaDrawer(props: BottomMetaDrawerProps) {
292292
zIndex: 2,
293293
}}
294294
title={<DrawerTitleView />}
295-
headerStyle={headerWrapperStyle}
296-
bodyStyle={{
297-
padding: "0 0 0 8px",
298-
scrollbarGutter: "stable",
299-
overflowX: "hidden",
295+
styles={{
296+
header: headerWrapperStyle,
297+
body: {
298+
padding: "0 0 0 8px",
299+
overflowX: "hidden",
300+
scrollbarGutter: "stable",
301+
}
300302
}}
301303
placement="bottom"
302304
closable={false}

client/packages/lowcoder/src/pages/setting/permission/styledComponents.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,14 @@ export function UserDetailPopup(props: { userId: string; title: string }) {
405405
</OperationLink>
406406
<CustomModal
407407
width={550}
408-
bodyStyle={{ maxHeight: "500px", overflow: "auto", maxWidth: "550px", width: "550px" }}
408+
styles={{
409+
body: {
410+
maxHeight: "500px",
411+
overflow: "auto",
412+
maxWidth: "550px",
413+
width: "550px"
414+
}
415+
}}
409416
open={visible}
410417
onCancel={() => setVisible(false)}
411418
title={title}

client/packages/lowcoder/src/pages/setting/theme/createModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function CreateModal(props: CreateModalProp) {
121121
<ScrollBarStyled
122122
style={{
123123
height: themeList?.length ? (themeList?.length > 3 ? "363px" : "313px") : "156px",
124-
marginBottom: (!!themeList?.length && themeList?.length) > 3 ? "4px" : "0",
124+
marginBottom: (!!themeList?.length && themeList?.length > 3) ? "4px" : "0",
125125
}}
126126
>
127127
<SelectTitle>{trans("theme.defaultThemeTip")}</SelectTitle>

client/packages/lowcoder/src/pages/setting/theme/themeList.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ function ThemeList(props: ThemeListProp) {
3939
}
4040
return (
4141
<TableStyled
42+
id="theme-list-table"
4243
ref={tableRef}
4344
rowKey="id"
4445
pagination={false}
@@ -153,7 +154,7 @@ function ThemeList(props: ThemeListProp) {
153154
<ListDropdown onClick={(e) => e.stopPropagation()}>
154155
<Dropdown
155156
trigger={["click"]}
156-
getPopupContainer={() => tableRef.current!}
157+
getPopupContainer={() => document.getElementById("theme-list-table")!}
157158
dropdownRender={() => (
158159
<Menu
159160
onClick={(params) => {

0 commit comments

Comments
 (0)