fix:
This commit is contained in:
parent
b0dd89817f
commit
167cf2c08e
|
@ -28,6 +28,10 @@ var _i18n2 = _interopRequireDefault(_i18n);
|
|||
|
||||
var _tool = require("bee-locale/build/tool");
|
||||
|
||||
var _propTypes = require("prop-types");
|
||||
|
||||
var _propTypes2 = _interopRequireDefault(_propTypes);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
@ -161,7 +165,7 @@ function filterColumn(Table, Popover) {
|
|||
columnFilterAble: true,
|
||||
scroll: {}
|
||||
}, _class.contextTypes = {
|
||||
beeLocale: PropTypes.object
|
||||
beeLocale: _propTypes2["default"].object
|
||||
}, _initialiseProps = function _initialiseProps() {
|
||||
var _this2 = this;
|
||||
|
||||
|
|
|
@ -12,7 +12,8 @@ import Table from "../../src";
|
|||
|
||||
const columns = [
|
||||
{
|
||||
title: "用户名", dataIndex: "a", key: "a", width: 80, className: "rowClassName",
|
||||
title: "用户名", dataIndex: "a", key: "a", width: 300, className: "rowClassName",
|
||||
fixed:'left',
|
||||
render: (text, record, index) => {
|
||||
return (
|
||||
<Tooltip inverse overlay={text}>
|
||||
|
@ -28,7 +29,7 @@ const columns = [
|
|||
);
|
||||
}
|
||||
},
|
||||
{ id: "123", title: "性别", dataIndex: "b", key: "b", width: '10%' },
|
||||
{ id: "123", title: "性别", dataIndex: "b", key: "b", width: 500},
|
||||
{ title: "年龄", dataIndex: "c", key: "c", width: 200 },
|
||||
{
|
||||
title: "操作",
|
||||
|
|
|
@ -14,13 +14,14 @@ const columns23 = [
|
|||
title: "名字",
|
||||
dataIndex: "a",
|
||||
key: "a",
|
||||
width: '200'
|
||||
width: '800',
|
||||
fixed:'left'
|
||||
},
|
||||
{
|
||||
title: "性别",
|
||||
dataIndex: "b",
|
||||
key: "b",
|
||||
width: '100'
|
||||
width: '600'
|
||||
},
|
||||
{
|
||||
title: "年龄",
|
||||
|
@ -29,19 +30,22 @@ const columns23 = [
|
|||
width: '200',
|
||||
sumCol: true,
|
||||
sorter: (a, b) => a.c - b.c
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "武功级别",
|
||||
dataIndex: "d",
|
||||
key: "d",
|
||||
fixed:'right',
|
||||
width: 200,
|
||||
width: 500,
|
||||
}
|
||||
];
|
||||
|
||||
const data23 = [
|
||||
{ a: "杨过", b: "男", c: 30,d:'内行', key: "2" },
|
||||
{ a: "令狐冲", b: "男", c: 41,d:'大侠', key: "1" },
|
||||
{ a: "郭靖", b: "男", c: 25,d:'大侠', key: "31" } , { a: "杨过", b: "男", c: 30,d:'内行', key: "21" },
|
||||
{ a: "令狐冲", b: "男", c: 41,d:'大侠', key: "11" },
|
||||
{ a: "郭靖", b: "男", c: 25,d:'大侠', key: "32" } , { a: "杨过", b: "男", c: 30,d:'内行', key: "22" },
|
||||
{ a: "令狐冲", b: "男", c: 41,d:'大侠', key: "12" },
|
||||
{ a: "郭靖", b: "男", c: 25,d:'大侠', key: "3" }
|
||||
];
|
||||
|
||||
|
@ -60,7 +64,7 @@ class Demo23 extends Component {
|
|||
return <DragColumnTable columns={columns23} data={data23} bordered
|
||||
dragborder={true}
|
||||
draggable={true}
|
||||
|
||||
scroll={{y:200}}
|
||||
onDropBorder ={(e,width)=>{
|
||||
console.log(width+"--调整列宽后触发事件",e.target);
|
||||
}}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bee-table",
|
||||
"version": "1.6.42",
|
||||
"version": "1.6.43",
|
||||
"description": "Table ui component for react",
|
||||
"keywords": [
|
||||
"react",
|
||||
|
|
|
@ -4,7 +4,7 @@ import Icon from "bee-icon";
|
|||
import { ObjectAssign } from "./util";
|
||||
import i18n from "./i18n";
|
||||
import { getComponentLocale } from "bee-locale/build/tool";
|
||||
|
||||
import PropTypes from "prop-types";
|
||||
function noop() {}
|
||||
/**
|
||||
* 参数: 过滤表头
|
||||
|
|
Loading…
Reference in New Issue