/*
 * @Author: wyd
 * @Date: 2024-03
 * @LastEditors: wyd
 * @LastEditTime: 2024-03
 * @Description: 重置pinia所有状态
 */
import cloneDeep from 'lodash/cloneDeep'

export default function resetStore(data: { store: any }) {
  const initialState = cloneDeep(data.store.$state)

  data.store.$reset = () => data.store.$patch(cloneDeep(initialState))
}
