-
Notifications
You must be signed in to change notification settings - Fork 2
/
extend.js
37 lines (33 loc) · 813 Bytes
/
extend.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import aarGrid from 'mk-aar-grid'
function getGridOption() {
return {
'table': {
path: 'data.list',
selectFieldName: 'selected',
cellClassName: 'mk-app-editable-table-cell',
emptyRow: {},
getColNames: (gf) => {
return [
'name',
'mobile',
'birthday',
'sex'
]
},
},
}
}
function actionCreator(option) {
return {
gridAction: new aarGrid.action({ ...option, gridOption: getGridOption() })
}
}
function reducerCreator(option) {
return {
gridReducer: new aarGrid.reducer({ ...option, gridOption: getGridOption() })
}
}
export default {
actionCreator,
reducerCreator
}