在浏览器中点击$ {API_URL} / auditResultsExport / 3时,会提示您下载csv。我试图将其包装在按钮中,以便在单击按钮时导致文件下载。 我尝试了两种方法都不起作用
for var1 in index2:
for var3 in index2:
model.add_constraint(model.sum(model.sum(model.sum(dev_var[a,b,c] for a in index1) for b in index1) for c in index1) == cec_var2[var1,var3])
onClick
<Button onClick={this.handleDownload}>Download all results</Button>
<Button href={`${API_URL}/Results/3`}>Download project results</Button>