fixed issues 1172
This commit is contained in:
parent
c5c9139db2
commit
d0f6ed02c2
@ -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"
|
||||
|
||||
@ -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 })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -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 })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
@ -75,7 +75,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) {
|
||||
|
||||
@ -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')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user