mirror of
https://codeberg.org/yeentown/barkey
synced 2024-12-03 06:57:26 +00:00
use toRaw?
This commit is contained in:
parent
b3ccfa8671
commit
747acd025d
2 changed files with 3 additions and 3 deletions
|
@ -187,7 +187,7 @@ function loadFile() {
|
||||||
async function applyRegistry(id: string) {
|
async function applyRegistry(id: string) {
|
||||||
if (!registries) return;
|
if (!registries) return;
|
||||||
|
|
||||||
const registry = structuredClone(registries[id]);
|
const registry = registries[id];
|
||||||
|
|
||||||
const { canceled: cancel1 } = await os.confirm({
|
const { canceled: cancel1 } = await os.confirm({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { onUnmounted, Ref, ref, watch } from 'vue';
|
import { onUnmounted, Ref, ref, toRaw, watch } from 'vue';
|
||||||
import { $i } from './account';
|
import { $i } from './account';
|
||||||
import { api } from './os';
|
import { api } from './os';
|
||||||
import { get, set } from './scripts/idb-proxy';
|
import { get, set } from './scripts/idb-proxy';
|
||||||
|
@ -153,7 +153,7 @@ export class Storage<T extends StateDef> {
|
||||||
public set<K extends keyof T>(key: K, value: T[K]['default']): Promise<void> {
|
public set<K extends keyof T>(key: K, value: T[K]['default']): Promise<void> {
|
||||||
// IndexedDBやBroadcastChannelで扱うために単純なオブジェクトにする
|
// IndexedDBやBroadcastChannelで扱うために単純なオブジェクトにする
|
||||||
// (JSON.parse(JSON.stringify(value))の代わり)
|
// (JSON.parse(JSON.stringify(value))の代わり)
|
||||||
const rawValue = structuredClone(value);
|
const rawValue = structuredClone(toRaw(value));
|
||||||
|
|
||||||
if (_DEV_) console.log('set', key, rawValue, value);
|
if (_DEV_) console.log('set', key, rawValue, value);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue