UNPKG

@cake-fxd/cake-cli-presets

Version:

蛋糕英语前端模版项目集合

35 lines (29 loc) 653 B
import { Reducer, AnyAction } from 'redux' import { Effect } from 'dva' export interface ExampleReduxType {} export type ExampleAction = AnyAction & Partial<ExampleReduxType> export interface ExampleModelType { namespace: string state: ExampleReduxType effects: { createOrder: Effect } reducers: { setOrderId: Reducer<ExampleReduxType, ExampleAction> } } const Model: ExampleModelType = { namespace: 'example', state: { orderId: '', }, effects: { *createOrder({ phone, cancleCb }, { call, put }) {}, }, reducers: { setOrderId(state, action) { return { ...state } }, }, } export default Model