chore: add english comment
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user