UNPKG

ttk-app-core

Version:
38 lines (33 loc) 872 B
import {GridDecorator} from 'edf-component' function getGridOption() { return { 'table': { path: 'data.list', selectFieldName: 'selected', cellClassName: 'ttk-edf-app-editable-cell', emptyRow: {}, getColNames: (gf) => { return [ 'name', 'mobile', 'birthday', 'sex' ] }, }, } } function actionCreator(option) { return { gridAction: new GridDecorator.action({ ...option, gridOption: getGridOption() }) } } function reducerCreator(option) { return { gridReducer: new GridDecorator.reducer({ ...option, gridOption: getGridOption() }) } } export default { actionCreator, reducerCreator }