$ Simplify boolean assignment, rename session storage key

This commit is contained in:
PikachuEXE 2024-05-30 14:03:41 +08:00 committed by PikachuEXE
parent f60ca8bfc7
commit 70983739f6
No known key found for this signature in database

View File

@ -74,9 +74,9 @@ export default defineComponent({
this.filterHistory()
},
},
mounted: function () {
created: function () {
document.addEventListener('keydown', this.keyboardShortcutHandler)
const limit = sessionStorage.getItem('historyLimit')
const limit = sessionStorage.getItem('History/dataLimit')
if (limit !== null) {
this.dataLimit = limit
@ -98,7 +98,7 @@ export default defineComponent({
this.filterHistory()
} else {
this.dataLimit += 100
sessionStorage.setItem('historyLimit', this.dataLimit)
sessionStorage.setItem('History/dataLimit', this.dataLimit)
}
},
filterHistoryAsync: function() {