mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 13:51:20 -08:00
添加自动尺寸
This commit is contained in:
1 parent
1d40d1c46b
commit
7d766ac1d5
23 files changed
+154
-54
No files matched your search
@@ -11,11 +11,11 @@ export default class Storage {
|
||||
|
||||
get(key) {
|
||||
const storage = JSON.parse(localStorage.getItem(this.storageName));
|
||||
return storage[key];
|
||||
return key ? storage[key] : {};
|
||||
}
|
||||
|
||||
set(key, value) {
|
||||
const storage = Object.assign({}, this.get() || {}, {
|
||||
const storage = Object.assign({}, this.get(), {
|
||||
[key]: value
|
||||
});
|
||||
localStorage.setItem(this.storageName, JSON.stringify(storage));
|
||||
|
||||
Reference in new issue
Block a user