publish 1.3.1

This commit is contained in:
jonyshi 2018-07-17 16:27:23 +08:00
parent cf555d7b2f
commit fd24f05025
10 changed files with 14 additions and 13 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -161,7 +161,7 @@ import multiSelect from "bee-table/build/lib/multiSelect.js"
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 |
| ------ | ---------- | -------- | ---- | | ------ | ---------- | -------- | ---- |
| sorter | 排序函数,可以自定义 | Function | 无 | | sorter | 排序函数,可以自定义 | Function | 无 |
| sorterClick | 排序钩子函数| Function | | | sorterClick | 排序钩子函数| Function | (coloum,type) |

View File

@ -117,7 +117,7 @@ function sort(Table, Icon) {
onClick: function onClick() { onClick: function onClick() {
_this2.toggleSortOrder("ascend", column); _this2.toggleSortOrder("ascend", column);
if (column.sorterClick) { if (column.sorterClick) {
column.sorterClick(column); column.sorterClick(column, "up");
} }
} }
}, },
@ -131,7 +131,7 @@ function sort(Table, Icon) {
onClick: function onClick() { onClick: function onClick() {
_this2.toggleSortOrder("descend", column); _this2.toggleSortOrder("descend", column);
if (column.sorterClick) { if (column.sorterClick) {
column.sorterClick(column); column.sorterClick(column, "down");
} }
} }
}, },

View File

@ -34,7 +34,8 @@ const columns13 = [
width: 200, width: 200,
sumCol: true, sumCol: true,
sorter: (a, b) => a.c - b.c, sorter: (a, b) => a.c - b.c,
sorterClick:data=>{//排序的回调函数 sorterClick:(data,type)=>{//排序的回调函数
//type value is up or down
console.log("data",data); console.log("data",data);
} }
}, },

File diff suppressed because one or more lines are too long

6
dist/demo.js vendored

File diff suppressed because one or more lines are too long

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -44,7 +44,7 @@ const MultiSelectTable = multiSelect(Table, Checkbox);
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 |
| ------ | ---------- | -------- | ---- | | ------ | ---------- | -------- | ---- |
| sorter | 排序函数,可以自定义 | Function | 无 | | sorter | 排序函数,可以自定义 | Function | 无 |
| sorterClick | 排序钩子函数| Function | | | sorterClick | 排序钩子函数| Function | (coloum,type) |
#### 使用 #### 使用

View File

@ -1,6 +1,6 @@
{ {
"name": "bee-table", "name": "bee-table",
"version": "1.3.0", "version": "1.3.1",
"description": "Table ui component for react", "description": "Table ui component for react",
"keywords": [ "keywords": [
"react", "react",

View File

@ -78,7 +78,7 @@ export default function sort(Table, Icon) {
onClick={() =>{ onClick={() =>{
this.toggleSortOrder("ascend", column); this.toggleSortOrder("ascend", column);
if(column.sorterClick){ if(column.sorterClick){
column.sorterClick(column); column.sorterClick(column,"up");
} }
} } } }
> >
@ -92,7 +92,7 @@ export default function sort(Table, Icon) {
onClick={() => { onClick={() => {
this.toggleSortOrder("descend", column); this.toggleSortOrder("descend", column);
if(column.sorterClick){ if(column.sorterClick){
column.sorterClick(column); column.sorterClick(column,"down");
} }
}} }}
> >