import { Input, Modal } from 'antd'; import type { CommandItem } from '@/pages/device/Command/typings'; import MonacoEditor from 'react-monaco-editor'; interface Props { close: () => void; data: CommandItem | undefined; visible: boolean; } const Cat = (props: Props) => { const { close, data, visible } = props; return ( close()} footer={null} title="查看指令" > 下发指令: { editor.onDidContentSizeChange?.(() => { editor.getAction('editor.action.formatDocument').run(); // .finally(() => { // editor.updateOptions({ readOnly: true }); // }); }); }} value={JSON.stringify(data?.downstream)} /> 回复结果: ); }; export default Cat;