|
|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
import React, { useState, useEffect } from 'react';
|
|
|
|
|
import { Modal, Button, Input, Message, Tooltip } from '@arco-design/web-react';
|
|
|
|
|
import { IconQuestionCircle, IconCopy, IconDelete, IconPlus } from '@arco-design/web-react/icon';
|
|
|
|
|
import copy from 'copy-to-clipboard';
|
|
|
|
|
import styles from './style/envConfigModal.module.less';
|
|
|
|
|
import { getComponentEnvConfig, saveComponentEnvConfig } from '@/api/componentInstance';
|
|
|
|
|
|
|
|
|
|
@ -83,8 +84,15 @@ const EnvConfigModal: React.FC<EnvConfigModalProps> = ({
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleCopyCommand = () => {
|
|
|
|
|
navigator.clipboard.writeText(configData.javaCommand);
|
|
|
|
|
Message.success('复制成功');
|
|
|
|
|
const textToCopy = language.includes('Python') ? configData.pythonCommand : configData.javaCommand;
|
|
|
|
|
|
|
|
|
|
const success = copy(textToCopy);
|
|
|
|
|
|
|
|
|
|
if (success) {
|
|
|
|
|
Message.success('复制成功');
|
|
|
|
|
} else {
|
|
|
|
|
Message.error('复制失败');
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleSave = async () => {
|
|
|
|
|
|