fixed: 修改高阶函数方法名和文档

This commit is contained in:
huyueb 2017-09-19 16:37:03 +08:00
parent c61f9fead6
commit af87aee325
5 changed files with 9 additions and 12 deletions

View File

@ -8,8 +8,8 @@
import React, { Component } from "react";
import Table from "../../src";
import Checkbox from "bee-checkbox";
import multiSelectFunc from "../../src/lib/multiSelectFunc.js";
import sortFunc from "../../src/lib/sortFunc.js";
import multiSelect from "../../src/lib/multiSelect.js";
import sort from "../../src/lib/sort.js";
const columns13 = [
{
@ -55,7 +55,7 @@ class Demo13 extends Component {
type: "checkbox",
param: "key"
};
let ComplexTable = multiSelectFunc(sortFunc(Table));
let ComplexTable = multiSelect(sort(Table));
return (
<div>
<ComplexTable

File diff suppressed because one or more lines are too long

View File

@ -1,12 +1,9 @@
## util
## mixin
Table拓展功能方法
### 如何使用
xxx
### multiSelectFunc
### multiSelect
全选功能
@ -21,7 +18,7 @@ xxx
### sortFunc
### sort
排序功能

View File

@ -8,7 +8,7 @@ import Checkbox from "bee-checkbox";
* getSelectedDataFunc--function能获取到选中的数据
* 使用全选时得注意data中的key值一定要是唯一值
*/
module.exports = function multiSelectFunc(Table) {
module.exports = function multiSelect(Table) {
Array.prototype.indexOf = function(val) {
for (var i = 0; i < this.length; i++) {
if (this[i] == val) return i;

View File

@ -6,7 +6,7 @@ import Icon from 'bee-icon';
* 参数prefixCls默认bee-table,用于设置图标的样式
* @param {*} Table
*/
export default function sortFunc(Table) {
export default function sort(Table) {
return class Demo11 extends Component {
constructor(props) {
super(props);