pref(envConfigModal): 优化指令复制函数的判断条件

master
钟良源 2 months ago
parent 751a631bbd
commit 5a7aa39f3d

@ -59,7 +59,7 @@ const EnvConfigModal: React.FC<EnvConfigModalProps> = ({
}; };
const handleConfigChange = (index: number, field: keyof ConfigItem, value: string) => { const handleConfigChange = (index: number, field: keyof ConfigItem, value: string) => {
const newConfigList:any = [...configList]; const newConfigList: any = [...configList];
newConfigList[index][field] = value; newConfigList[index][field] = value;
setConfigList(newConfigList); setConfigList(newConfigList);
}; };
@ -83,10 +83,8 @@ const EnvConfigModal: React.FC<EnvConfigModalProps> = ({
}; };
const handleCopyCommand = () => { const handleCopyCommand = () => {
if (configData?.javaCommand) {
navigator.clipboard.writeText(configData.javaCommand); navigator.clipboard.writeText(configData.javaCommand);
Message.success('复制成功'); Message.success('复制成功');
}
}; };
const handleSave = async () => { const handleSave = async () => {

Loading…
Cancel
Save