subrules sync time

This commit is contained in:
Gabe Yuan
2023-09-11 22:53:04 +08:00
parent 79612f8a1b
commit fa244b2097
5 changed files with 28 additions and 11 deletions

View File

@@ -31,6 +31,7 @@ export function useStorage(key, defaultVal = null) {
if (val) {
setData(val);
} else if (defaultVal) {
setData(defaultVal);
await storage.setObj(key, defaultVal);
}
}, [key, defaultVal]);