修改导出语法规范
This commit is contained in:
parent
d4c15e2d2f
commit
26085cc3f8
|
@ -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 <Table {...this.props} columns={columns} />;
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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 = (
|
||||
<div className={`${prefixCls}-column-sorter`}>
|
||||
<span
|
||||
className={`${prefixCls}-column-sorter-up ${isAscend
|
||||
? "on"
|
||||
: "off"}`}
|
||||
className={`${prefixCls}-column-sorter-up ${
|
||||
isAscend ? "on" : "off"
|
||||
}`}
|
||||
title="↑"
|
||||
onClick={() => this.toggleSortOrder("ascend", column)}
|
||||
>
|
||||
<Icon type="uf-triangle-up" />
|
||||
</span>
|
||||
<span
|
||||
className={`${prefixCls}-column-sorter-down ${isDescend
|
||||
? "on"
|
||||
: "off"}`}
|
||||
className={`${prefixCls}-column-sorter-down ${
|
||||
isDescend ? "on" : "off"
|
||||
}`}
|
||||
title="↓"
|
||||
onClick={() => this.toggleSortOrder("descend", column)}
|
||||
>
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue