Initial commit

This commit is contained in:
Dmitry Popov
2024-09-18 01:55:30 +04:00
parent 6a96a5f56e
commit 4136aaad76
1675 changed files with 124664 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
export default {
key(): string {
return this.el.dataset.key;
},
getItem(key: string) {
return localStorage.getItem(key);
},
setItem(key: string, value: string) {
return localStorage.setItem(key, value);
},
mounted() {
const key = this.key();
this.pushEvent(`ls_restore_${key}`, { value: this.getItem(key) });
this.handleEvent(`ls_update_${key}`, ({ value }) => this.setItem(key, value));
},
};