改变下载任务插入方式
parent
393affbd90
commit
125207226b
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
- 优化月里嫦娥皮肤侧栏鼠标悬浮颜色
|
- 优化月里嫦娥皮肤侧栏鼠标悬浮颜色
|
||||||
- 优化播放进度条的动画效果
|
- 优化播放进度条的动画效果
|
||||||
|
- 现在添加下载任务时,后面添加的任务会在列表顶部插入
|
||||||
|
|
||||||
### 修复
|
### 修复
|
||||||
|
|
||||||
|
|
|
@ -126,8 +126,10 @@ const refreshUrl = function(commit, downloadInfo) {
|
||||||
getUrl(downloadInfo, true).then(result => {
|
getUrl(downloadInfo, true).then(result => {
|
||||||
commit('updateUrl', { downloadInfo, url: result.url })
|
commit('updateUrl', { downloadInfo, url: result.url })
|
||||||
commit('setStatusText', { downloadInfo, text: '链接刷新成功' })
|
commit('setStatusText', { downloadInfo, text: '链接刷新成功' })
|
||||||
dls[downloadInfo.key].refreshUrl(result.url)
|
const dl = dls[downloadInfo.key]
|
||||||
dls[downloadInfo.key].start()
|
if (!dl) return
|
||||||
|
dl.refreshUrl(result.url)
|
||||||
|
dl.start()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
this.dispatch('download/startTask')
|
this.dispatch('download/startTask')
|
||||||
|
@ -325,7 +327,7 @@ const actions = {
|
||||||
// mitations
|
// mitations
|
||||||
const mutations = {
|
const mutations = {
|
||||||
addTask(state, downloadInfo) {
|
addTask(state, downloadInfo) {
|
||||||
state.list.push(downloadInfo)
|
state.list.unshift(downloadInfo)
|
||||||
},
|
},
|
||||||
removeTask(state, index) {
|
removeTask(state, index) {
|
||||||
state.list.splice(index, 1)
|
state.list.splice(index, 1)
|
||||||
|
|
Loading…
Reference in New Issue