diff --git a/src/lib/multiSelect.js b/src/lib/multiSelect.js index a2873de..b4e683b 100644 --- a/src/lib/multiSelect.js +++ b/src/lib/multiSelect.js @@ -8,7 +8,7 @@ import Checkbox from "bee-checkbox"; * getSelectedDataFunc--function,能获取到选中的数据 * 使用全选时得注意,data中的key值一定要是唯一值 */ -module.exports = function multiSelect(Table) { +export default function multiSelect(Table) { Array.prototype.indexOf = function(val) { for (var i = 0; i < this.length; i++) { if (this[i] == val) return i; @@ -90,7 +90,7 @@ module.exports = function multiSelect(Table) { checkedObj: checkedObj, selIds: selIds }); - if(typeof getSelectedDataFunc === 'function'){ + if (typeof getSelectedDataFunc === "function") { getSelectedDataFunc(selIds); } }; @@ -150,4 +150,4 @@ module.exports = function multiSelect(Table) { return ; } }; -}; +} diff --git a/src/lib/sort.js b/src/lib/sort.js index 22b360c..8d7abf1 100644 --- a/src/lib/sort.js +++ b/src/lib/sort.js @@ -3,7 +3,7 @@ import Icon from "bee-icon"; /** * 参数:prefixCls,默认bee-table,用于设置图标的样式 - * @param {*} Table + * @param {*} Table */ export default function sort(Table) { return class Demo11 extends Component { @@ -62,18 +62,18 @@ export default function sort(Table) { sortButton = (
this.toggleSortOrder("ascend", column)} > this.toggleSortOrder("descend", column)} > diff --git a/src/lib/sum.js b/src/lib/sum.js index ba8b21f..7d34ab2 100644 --- a/src/lib/sum.js +++ b/src/lib/sum.js @@ -8,7 +8,7 @@ let columns2 = { dataIndex: "showSum" }; -let sum = Table => { +export default function sum(Table){ return class SumTable extends React.Component { //无状态 constructor(props) { @@ -17,7 +17,7 @@ let sum = Table => { //合计数字列,并将计算所得数据存储到一个obj对象中 currentFooter = () => { let data_2 = this.props.data; - let columns_sum = (this.props.columns).concat(); + let columns_sum = this.props.columns.concat(); let sumCol_index; //用一个对象存储合计数据,这里合计对象的属性对应每列字段 for (let i = 0; i < columns_sum.length; i++) { @@ -66,5 +66,3 @@ let sum = Table => { } }; }; - -export default sum;