import { defineStore } from 'pinia'

export const useTargetUser = defineStore('targetUser', {
  state: () => ({
    targetUser: {},
  }),

  actions: {
    setTargetUser(targetUser) {
      console.log('setTargetUser设置充值对象')
      this.targetUser = targetUser
    },

    // 清空方法
    clearTargetUser() {
      console.log('clearTargetUser清空充值对象')
      this.targetUser = {}
    },
  },

  persist: true,
})
