refactor(projects): replace cloneDeep of lodash-es with klona

This commit is contained in:
Soybean
2024-07-20 02:14:20 +08:00
parent 3e2a993db8
commit a91335d74b
7 changed files with 18 additions and 12 deletions

View File

@ -1,5 +1,5 @@
import type { PiniaPluginContext } from 'pinia';
import { cloneDeep } from 'lodash-es';
import { jsonClone } from '@sa/utils';
import { SetupStoreId } from '@/enum';
/**
@ -13,7 +13,7 @@ export function resetSetupStore(context: PiniaPluginContext) {
if (setupSyntaxIds.includes(context.store.$id)) {
const { $state } = context.store;
const defaultStore = cloneDeep($state);
const defaultStore = jsonClone($state);
context.store.$reset = () => {
context.store.$patch(defaultStore);