Skip to content

Commit

Permalink
Spotless Apply
Browse files Browse the repository at this point in the history
  • Loading branch information
zhu-mingye authored and github-actions[bot] committed Oct 11, 2023
1 parent fee1eb4 commit b4a9387
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 21 deletions.
25 changes: 8 additions & 17 deletions dinky-web/src/components/CallBackButton/LoadingBtn.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
import React, {useState} from "react";
import {Button} from "antd";
import {ButtonProps} from "antd/es/button/button";


import { Button } from 'antd';
import { ButtonProps } from 'antd/es/button/button';
import React, { useState } from 'react';

export const LoadingBtn: React.FC<ButtonProps> = (props) => {

const [loading, setLoading] = useState(false);

const handleClick = async (event: React.MouseEvent<HTMLElement, MouseEvent>) => {
if (props.onClick) {
setLoading(true)
await props.onClick(event)
setLoading(false)
setLoading(true);
await props.onClick(event);
setLoading(false);
}
}
};

return (
<Button
{...props}
loading={loading}
onClick={(event) =>handleClick(event)}
></Button>
);
return <Button {...props} loading={loading} onClick={(event) => handleClick(event)}></Button>;
};
8 changes: 4 additions & 4 deletions dinky-web/src/pages/DataStudio/HeaderContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import {
FundOutlined,
MergeCellsOutlined,
MoreOutlined,
PauseOutlined, PlayCircleTwoTone,
PauseOutlined,
RotateRightOutlined,
SaveOutlined,
ScheduleOutlined,
Expand Down Expand Up @@ -261,15 +261,15 @@ const HeaderContainer = (props: any) => {
},
{
// 执行按钮
icon: <CaretRightFilled/>,
icon: <CaretRightFilled />,
title: l('pages.datastudio.editor.exec'),
click: handlerSubmit,
hotKey: (e: KeyboardEvent) => e.shiftKey && e.key === 'F10',
hotKeyDesc: 'Shift+F10',
isShow: currentTab?.type == TabsPageType.project && !isRunning(currentData),
props: {
style: {background: "#52c41a"},
type: 'primary',
style: { background: '#52c41a' },
type: 'primary'
}
},
{
Expand Down

0 comments on commit b4a9387

Please sign in to comment.