Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
download-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
downloader
download-web
Commits
d5ba7de8
Commit
d5ba7de8
authored
Sep 02, 2025
by
焦子成
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f1f7dd3b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
src/stores/download.js
+2
-3
src/views/Downloader.vue
+6
-4
No files found.
src/stores/download.js
View file @
d5ba7de8
...
...
@@ -150,8 +150,8 @@ export const useDownloadStore = defineStore('download', () => {
// 创建 AbortController 用于取消下载
download
.
controller
=
new
AbortController
()
console
.
log
(
'download config.url-->'
,
config
.
downLoadStatus
)
console
.
log
(
'download id-->'
,
download
.
id
)
//
console.log('download config.url-->',config.downLoadStatus)
//
console.log('download id-->',download.id)
try
{
await
performDownload
(
download
)
http
.
post
(
config
.
downLoadStatus
,{
...
...
@@ -385,7 +385,6 @@ export const useDownloadStore = defineStore('download', () => {
// 保存文件到自定义文件夹
const
blob
=
xhr
.
response
try
{
// 尝试使用现代浏览器的 File System Access API
if
(
'showSaveFilePicker'
in
window
)
{
...
...
src/views/Downloader.vue
View file @
d5ba7de8
...
...
@@ -355,7 +355,7 @@
<
el
-
table
-
column
label
=
"操作"
width
=
"200"
align
=
"center"
fixed
=
"right"
>
<
template
#
default
=
"{ row
}
"
>
<
div
class
=
"download-actions"
>
<
el
-
button
v
-
if
=
"row.status === 'pending'"
@
click
=
"startSingleDownload(row
.id
)"
type
=
"primary"
<
el
-
button
v
-
if
=
"row.status === 'pending'"
@
click
=
"startSingleDownload(row)"
type
=
"primary"
size
=
"small"
>
开始
<
/el-button
>
...
...
@@ -370,7 +370,7 @@
继续
<
/el-button
>
<
el
-
button
v
-
if
=
"row.status === 'error'"
@
click
=
"startSingleDownload(row
.id
)"
type
=
"warning"
<
el
-
button
v
-
if
=
"row.status === 'error'"
@
click
=
"startSingleDownload(row)"
type
=
"warning"
size
=
"small"
>
重试
<
/el-button
>
...
...
@@ -1299,10 +1299,12 @@ const handleStatusFilterChange = () => {
}
// 单个文件下载
const startSingleDownload = async (downloadId) => {
const startSingleDownload = async (row) => {
downloadStore.setCustomSubFolder(row.filePrefix)
downloadStore.isSingleDownloading = true
try {
await downloadStore.startDownload(
downloadI
d)
await downloadStore.startDownload(
row.i
d)
loadDetailTableData()
loadUploadDetailTotalNum()
}
finally {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment