import { defineStore } from 'pinia'
export default defineStore('userInfo', {
  state: () => ({
    permissions: [] as string[],
    token: '',
    id: '',
    username: '',
    password: '',
    roleId: '',
    realname: '',
    headPic: ''
  }),
  persist: {
    enabled: true,
    strategies: [
      {
        key: 'userInfo', // 持久化状态的键
        storage: localStorage // 使用localStorage来持久化状态
      }
    ]
  }
})
