fixed: 修改高阶函数方法名和文档
This commit is contained in:
parent
c61f9fead6
commit
af87aee325
|
@ -8,8 +8,8 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import Table from "../../src";
|
import Table from "../../src";
|
||||||
import Checkbox from "bee-checkbox";
|
import Checkbox from "bee-checkbox";
|
||||||
import multiSelectFunc from "../../src/lib/multiSelectFunc.js";
|
import multiSelect from "../../src/lib/multiSelect.js";
|
||||||
import sortFunc from "../../src/lib/sortFunc.js";
|
import sort from "../../src/lib/sort.js";
|
||||||
|
|
||||||
const columns13 = [
|
const columns13 = [
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,7 @@ class Demo13 extends Component {
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
param: "key"
|
param: "key"
|
||||||
};
|
};
|
||||||
let ComplexTable = multiSelectFunc(sortFunc(Table));
|
let ComplexTable = multiSelect(sort(Table));
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<ComplexTable
|
<ComplexTable
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,12 +1,9 @@
|
||||||
## util
|
## mixin
|
||||||
|
|
||||||
Table拓展功能方法
|
Table拓展功能方法
|
||||||
|
|
||||||
### 如何使用
|
|
||||||
xxx
|
|
||||||
|
|
||||||
|
### multiSelect
|
||||||
### multiSelectFunc
|
|
||||||
|
|
||||||
全选功能
|
全选功能
|
||||||
|
|
||||||
|
@ -21,7 +18,7 @@ xxx
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### sortFunc
|
### sort
|
||||||
|
|
||||||
排序功能
|
排序功能
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import Checkbox from "bee-checkbox";
|
||||||
* getSelectedDataFunc--function,能获取到选中的数据
|
* getSelectedDataFunc--function,能获取到选中的数据
|
||||||
* 使用全选时得注意,data中的key值一定要是唯一值
|
* 使用全选时得注意,data中的key值一定要是唯一值
|
||||||
*/
|
*/
|
||||||
module.exports = function multiSelectFunc(Table) {
|
module.exports = function multiSelect(Table) {
|
||||||
Array.prototype.indexOf = function(val) {
|
Array.prototype.indexOf = function(val) {
|
||||||
for (var i = 0; i < this.length; i++) {
|
for (var i = 0; i < this.length; i++) {
|
||||||
if (this[i] == val) return i;
|
if (this[i] == val) return i;
|
|
@ -6,7 +6,7 @@ import Icon from 'bee-icon';
|
||||||
* 参数:prefixCls,默认bee-table,用于设置图标的样式
|
* 参数:prefixCls,默认bee-table,用于设置图标的样式
|
||||||
* @param {*} Table
|
* @param {*} Table
|
||||||
*/
|
*/
|
||||||
export default function sortFunc(Table) {
|
export default function sort(Table) {
|
||||||
return class Demo11 extends Component {
|
return class Demo11 extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
Loading…
Reference in New Issue