keep it simple

This commit is contained in:
evanpeng 2020-12-29 11:36:17 +08:00
parent f82c5e0131
commit 09ad91b8e3
8 changed files with 13 additions and 13 deletions

View File

@ -95,7 +95,7 @@ export default {
if (old === "search" && !this.active) {
if (this.reload) {
this.setReload({ value: true,isReset: false })
this.setReload(true)
}
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', { value: true,isReset: false })
this.$store.commit('setReload', true)
}).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', { value: true,isReset: false })
this.$store.commit('setReload', true)
}).catch(this.$showError)
}
}
@ -457,7 +457,7 @@ export default {
this.$showError(e)
}
this.$store.commit('setReload', { value: true,isReset: false })
this.$store.commit('setReload', true)
}
}
}

View File

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

View File

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

View File

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

View File

@ -77,7 +77,7 @@ export default {
return
}
this.$store.commit('setReload', { value: true,isReset: false })
this.$store.commit('setReload', true)
} 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', { value: true,isReset: false }, { root: true })
context.commit('setReload', true, { root: true })
}
if (canProcess) {

View File

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