bug fixed 1172

This commit is contained in:
evanpeng 2020-12-25 10:54:12 +08:00
parent 7a5298a755
commit 403569f79b
8 changed files with 15 additions and 13 deletions

View File

@ -95,7 +95,7 @@ export default {
if (old === "search" && !this.active) {
if (this.reload) {
this.setReload(true)
this.setReload({ value: true,isReset: false })
}
document.body.style.overflow = "auto"

View File

@ -274,7 +274,7 @@ export default {
let action = (overwrite, rename) => {
api.copy(items, overwrite, rename).then(() => {
this.$store.commit('setReload', true)
this.$store.commit('setReload', { value: true,isReset: false })
}).catch(this.$showError)
}
@ -282,7 +282,7 @@ export default {
action = (overwrite, rename) => {
api.move(items, overwrite, rename).then(() => {
this.$store.commit('resetClipboard')
this.$store.commit('setReload', true)
this.$store.commit('setReload', { value: true,isReset: false })
}).catch(this.$showError)
}
}
@ -457,7 +457,7 @@ export default {
this.$showError(e)
}
this.$store.commit('setReload', true)
this.$store.commit('setReload', { value: true,isReset: false })
}
}
}

View File

@ -143,7 +143,7 @@ export default {
let action = (overwrite, rename) => {
api.move(items, overwrite, rename).then(() => {
this.$store.commit('setReload', true)
this.$store.commit('setReload', { value: true,isReset: false })
}).catch(this.$showError)
}

View File

@ -60,7 +60,7 @@ export default {
buttons.success('copy')
if (this.$route.path === this.dest) {
this.$store.commit('setReload', true)
this.$store.commit('setReload', { value: true,isReset: false })
return
}

View File

@ -56,11 +56,11 @@ export default {
await Promise.all(promises)
buttons.success('delete')
this.$store.commit('setReload', true)
this.$store.commit('setReload', { value: true,isReset: false })
} catch (e) {
buttons.done('delete')
this.$showError(e)
if (this.isListing) this.$store.commit('setReload', true)
if (this.isListing) this.$store.commit('setReload', { value: true,isReset: false })
}
}
}

View File

@ -77,7 +77,7 @@ export default {
return
}
this.$store.commit('setReload', true)
this.$store.commit('setReload', { value: true,isReset: false })
} catch (e) {
this.$showError(e)
}

View File

@ -76,7 +76,7 @@ const actions = {
window.removeEventListener('beforeunload', beforeUnload)
buttons.success('upload')
context.commit('reset')
context.commit('setReload', true, { root: true })
context.commit('setReload', { value: true,isReset: false }, { root: true })
}
if (canProcess) {

View File

@ -112,8 +112,10 @@ export default {
},
watch: {
'$route': 'fetchData',
'reload': function () {
this.fetchData()
'reload': function (newV) {
if (newV.isReset === false) {
this.fetchData()
}
}
},
mounted () {
@ -131,7 +133,7 @@ export default {
...mapMutations([ 'setLoading' ]),
async fetchData () {
// Reset view information.
this.$store.commit('setReload', false)
this.$store.commit('setReload', { value: false,isReset: true })
this.$store.commit('resetSelected')
this.$store.commit('multiple', false)
this.$store.commit('closeHovers')