import { TypeI3list } from '@/pages/Isystem/I3numSet/data'

// 初始化状态
const initState = {
  // 列表数据
  tableList: [] as TypeI3list[]
}

// 定义 action 类型
type Props = {
  type: 'I3/getList'
  payload: TypeI3list[]
}

// reducer
export default function Reducer(state = initState, action: Props) {
  switch (action.type) {
    // 获取列表数据
    case 'I3/getList':
      return { ...state, tableList: action.payload }

    default:
      return state
  }
}
