|
@ -61,6 +61,7 @@ const Code: React.FC<IProps> = (props) => { |
|
|
title={title} |
|
|
title={title} |
|
|
value={value} |
|
|
value={value} |
|
|
visible={visible} |
|
|
visible={visible} |
|
|
|
|
|
flowChart={flowChart} |
|
|
onSave={onSave} |
|
|
onSave={onSave} |
|
|
onOk={onClickOk} |
|
|
onOk={onClickOk} |
|
|
onCancel={onClickCancel} |
|
|
onCancel={onClickCancel} |
|
@ -73,13 +74,14 @@ interface IEditorModalProps { |
|
|
visible: boolean; |
|
|
visible: boolean; |
|
|
title: string; |
|
|
title: string; |
|
|
value: string; |
|
|
value: string; |
|
|
|
|
|
flowChart: Graph; |
|
|
onSave: (val: string) => void; |
|
|
onSave: (val: string) => void; |
|
|
onOk: (val: string) => void; |
|
|
onOk: (val: string) => void; |
|
|
onCancel: () => void; |
|
|
onCancel: () => void; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const EditModal: React.FC<IEditorModalProps> = (props) => { |
|
|
const EditModal: React.FC<IEditorModalProps> = (props) => { |
|
|
const { visible, title, value, onSave, onOk, onCancel } = props; |
|
|
const { visible, title, value, flowChart, onSave, onOk, onCancel } = props; |
|
|
const [code, setCode] = useState<string>(value); |
|
|
const [code, setCode] = useState<string>(value); |
|
|
const [editorInst, setEditorInst] = useState<any>(); |
|
|
const [editorInst, setEditorInst] = useState<any>(); |
|
|
const [codeRunVisible, setCodeRunVisible] = useState<boolean>(false); |
|
|
const [codeRunVisible, setCodeRunVisible] = useState<boolean>(false); |
|
@ -153,7 +155,7 @@ const EditModal: React.FC<IEditorModalProps> = (props) => { |
|
|
onOk={onRunOk} |
|
|
onOk={onRunOk} |
|
|
onCancel={onRunCancel} |
|
|
onCancel={onRunCancel} |
|
|
> |
|
|
> |
|
|
<CodeRun /> |
|
|
<CodeRun flowChart={flowChart}/> |
|
|
</Modal> |
|
|
</Modal> |
|
|
</Modal> |
|
|
</Modal> |
|
|
); |
|
|
); |
|
|