资源课件列表课件下载以及重置按钮优化

This commit is contained in:
unknown 2023-07-29 10:14:18 +08:00
parent 2626f41de8
commit 974afab24d

View File

@ -151,7 +151,7 @@ const ResourceCoursewarePage = () => {
size="small" size="small"
className="b-n-link c-red" className="b-n-link c-red"
onClick={() => { onClick={() => {
downLoadFile(record.id); downLoadFile(record.url);
}} }}
> >
@ -161,7 +161,7 @@ const ResourceCoursewarePage = () => {
type="link" type="link"
className="b-link c-red" className="b-link c-red"
onClick={() => { onClick={() => {
setUpdateId(record.url); setUpdateId(record.id);
setUpdateVisible(true); setUpdateVisible(true);
}} }}
> >
@ -206,6 +206,7 @@ const ResourceCoursewarePage = () => {
setPage(1); setPage(1);
setSize(10); setSize(10);
setList([]); setList([]);
setTitle("");
setSelectedRowKeys([]); setSelectedRowKeys([]);
setType("WORD,EXCEL,PPT,PDF,TXT,RAR,ZIP"); setType("WORD,EXCEL,PPT,PDF,TXT,RAR,ZIP");
setRefresh(!refresh); setRefresh(!refresh);
@ -260,7 +261,8 @@ const ResourceCoursewarePage = () => {
}; };
const downLoadFile = (url: string) => { const downLoadFile = (url: string) => {
window.location.href = url; console.log(url);
window.open(url);
}; };
return ( return (