fixed: 修改高阶函数方法名和文档
This commit is contained in:
parent
c61f9fead6
commit
af87aee325
|
@ -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
|
@ -1,12 +1,9 @@
|
|||
## util
|
||||
## mixin
|
||||
|
||||
Table拓展功能方法
|
||||
|
||||
### 如何使用
|
||||
xxx
|
||||
|
||||
|
||||
### multiSelectFunc
|
||||
### multiSelect
|
||||
|
||||
全选功能
|
||||
|
||||
|
@ -21,7 +18,7 @@ xxx
|
|||
|
||||
|
||||
|
||||
### sortFunc
|
||||
### sort
|
||||
|
||||
排序功能
|
||||
|
||||
|
|
|
@ -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;
|
|
@ -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);
|
Loading…
Reference in New Issue