mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(projects): replace cloneDeep
of lodash-es
with klona
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user