"back" button fixed

This commit is contained in:
niubility000 2021-09-21 23:24:06 +08:00 committed by GitHub
parent 0426629a59
commit 8e2d696b61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,9 +106,6 @@ export default {
return filesize(this.size); return filesize(this.size);
}, },
humanTime: function () { humanTime: function () {
if (this.user.dateFormat) {
return moment(this.modified).format("L LT");
}
return moment(this.modified).fromNow(); return moment(this.modified).fromNow();
}, },
dragStart: function () { dragStart: function () {
@ -247,7 +244,11 @@ export default {
this.addSelected(this.index); this.addSelected(this.index);
}, },
open: function () { open: function () {
this.$router.push({ path: this.url }); if (this.isDir) {
this.$router.push({ path: this.url });
} else {
this.$router.replace({ path: this.url });
}
}, },
}, },
}; };