chore: add english comment

This commit is contained in:
jialin
2024-08-28 14:51:20 +08:00
parent 9a0aeb491a
commit 9bd6dedd90
28 changed files with 353 additions and 145 deletions
@@ -239,6 +239,30 @@ const MessageList: React.FC<MessageProps> = forwardRef((props, ref) => {
}
);
useHotkeys(
HotKeys.CREATE.join(','),
() => {
handleNewMessage();
},
{
enabled: !loading,
enableOnFormTags: !loading,
preventDefault: true
}
);
useHotkeys(
HotKeys.CLEAR.join(','),
() => {
handleClear();
},
{
enabled: !loading,
enableOnFormTags: !loading,
preventDefault: true
}
);
return (
<div className="ground-left">
<div
+14
View File
@@ -1,9 +1,11 @@
import IconFont from '@/components/icon-font';
import HotKeys from '@/config/hotkeys';
import { PageContainer } from '@ant-design/pro-components';
import { useIntl, useSearchParams } from '@umijs/max';
import { Button, Divider, Space } from 'antd';
import classNames from 'classnames';
import { useRef, useState } from 'react';
import { useHotkeys } from 'react-hotkeys-hook';
import GroundLeft from './components/ground-left';
import ParamsSettings from './components/params-settings';
import './style/play-ground.less';
@@ -20,6 +22,18 @@ const Playground: React.FC = () => {
groundLeftRef.current?.viewCode?.();
};
useHotkeys(
HotKeys.RIGHT.join(','),
() => {
setCollapse((pre) => {
return !pre;
});
},
{
preventDefault: true
}
);
return (
<PageContainer
ghost