Commit 794096a3 authored by wuyongsheng's avatar wuyongsheng

feat: 错误处理

parent ca93c8ce
...@@ -18,6 +18,8 @@ type IDownloadProps = { ...@@ -18,6 +18,8 @@ type IDownloadProps = {
setOpen: any; setOpen: any;
}; };
type IFileTypeMap = 'SMILES' | 'SD' |'PDB' |'MOL' |'MOL2' | 'PDBQT' | 'POSES'
const flieTypeMap = { const flieTypeMap = {
SMILES: ".smi", SMILES: ".smi",
SD: ".sdf", SD: ".sdf",
...@@ -25,7 +27,7 @@ const flieTypeMap = { ...@@ -25,7 +27,7 @@ const flieTypeMap = {
MOL: ".mol", MOL: ".mol",
MOL2: ".mol2", MOL2: ".mol2",
PDBQT: ".pdbqt", PDBQT: ".pdbqt",
'PDBQT(DOCKING POSES)': '.pdbqt' 'POSES': '.pdbqt'
}; };
const Download = (props: IDownloadProps) => { const Download = (props: IDownloadProps) => {
...@@ -42,7 +44,7 @@ const Download = (props: IDownloadProps) => { ...@@ -42,7 +44,7 @@ const Download = (props: IDownloadProps) => {
setOpen, setOpen,
} = props; } = props;
const Message = useMessage(); const Message = useMessage();
const [downloadType, setDownloadType] = useState("SMILES"); const [downloadType, setDownloadType] = useState<IFileTypeMap>("SMILES");
const options = [ const options = [
{ {
label: "SMILES", label: "SMILES",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment