import { I4tableType } from '@/pages/Isystem/I4processSet/data'

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

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

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

    default:
      return state
  }
}
