diff options
Diffstat (limited to 'src/views/ChecksumTab.vue')
-rw-r--r-- | src/views/ChecksumTab.vue | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/views/ChecksumTab.vue b/src/views/ChecksumTab.vue index f08306e..3465efd 100644 --- a/src/views/ChecksumTab.vue +++ b/src/views/ChecksumTab.vue @@ -90,6 +90,7 @@ export default { * @param {Object} fileInfo the current file FileInfo. */ update(fileInfo) { + this.resetState() this.fileInfo = fileInfo }, @@ -113,7 +114,7 @@ export default { */ getChecksum(algorithmType) { const url = generateUrl('/apps/checksum/check') - const params = { source: this.fileInfo.path + this.fileInfo.name, type: algorithmType } + const params = { source: `${this.fileInfo.path}/${this.fileInfo.name}`, type: algorithmType } axios.get(url, { params }).then(response => { this.loading = false this.hash = response.data.msg @@ -127,7 +128,8 @@ export default { */ resetState() { this.loading = false - this.algorithm = '' + this.algorithm = algorithms[0] + this.hash = '' }, }, } |