import { defineStore } from 'pinia'

export const useExamViewStore = defineStore('examView', {
  state: () => ({
    activeTab: 'first',
    currentPage: 1,
    pageSize: 10,
    filterSector: '',
    isBackFromDetail: false
  }),
  actions: {
    resetState() {
      this.activeTab = 'first'
      this.currentPage = 1
      this.pageSize = 10
      this.filterSector = ''
      this.isBackFromDetail = null
    }
  },
  persist: true // 可选：如果你希望刷新也能保留状态
})
