This commit is contained in:
wanghaoo 2019-02-25 16:44:05 +08:00
parent b0dd89817f
commit 167cf2c08e
9 changed files with 113 additions and 318 deletions

BIN
build.zip Normal file

Binary file not shown.

View File

@ -28,6 +28,10 @@ var _i18n2 = _interopRequireDefault(_i18n);
var _tool = require("bee-locale/build/tool"); 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 _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; } 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, columnFilterAble: true,
scroll: {} scroll: {}
}, _class.contextTypes = { }, _class.contextTypes = {
beeLocale: PropTypes.object beeLocale: _propTypes2["default"].object
}, _initialiseProps = function _initialiseProps() { }, _initialiseProps = function _initialiseProps() {
var _this2 = this; var _this2 = this;

View File

@ -12,7 +12,8 @@ import Table from "../../src";
const columns = [ 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) => { render: (text, record, index) => {
return ( return (
<Tooltip inverse overlay={text}> <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: "年龄", dataIndex: "c", key: "c", width: 200 },
{ {
title: "操作", title: "操作",

View File

@ -14,13 +14,14 @@ const columns23 = [
title: "名字", title: "名字",
dataIndex: "a", dataIndex: "a",
key: "a", key: "a",
width: '200' width: '800',
fixed:'left'
}, },
{ {
title: "性别", title: "性别",
dataIndex: "b", dataIndex: "b",
key: "b", key: "b",
width: '100' width: '600'
}, },
{ {
title: "年龄", title: "年龄",
@ -34,14 +35,17 @@ const columns23 = [
title: "武功级别", title: "武功级别",
dataIndex: "d", dataIndex: "d",
key: "d", key: "d",
fixed:'right', width: 500,
width: 200,
} }
]; ];
const data23 = [ const data23 = [
{ a: "杨过", b: "男", c: 30,d:'内行', key: "2" }, { a: "杨过", b: "男", c: 30,d:'内行', key: "2" },
{ a: "令狐冲", b: "男", c: 41,d:'大侠', key: "1" }, { 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" } { a: "郭靖", b: "男", c: 25,d:'大侠', key: "3" }
]; ];
@ -60,7 +64,7 @@ class Demo23 extends Component {
return <DragColumnTable columns={columns23} data={data23} bordered return <DragColumnTable columns={columns23} data={data23} bordered
dragborder={true} dragborder={true}
draggable={true} draggable={true}
scroll={{y:200}}
onDropBorder ={(e,width)=>{ onDropBorder ={(e,width)=>{
console.log(width+"--调整列宽后触发事件",e.target); console.log(width+"--调整列宽后触发事件",e.target);
}} }}

File diff suppressed because one or more lines are too long

396
dist/demo.js vendored

File diff suppressed because one or more lines are too long

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "bee-table", "name": "bee-table",
"version": "1.6.42", "version": "1.6.43",
"description": "Table ui component for react", "description": "Table ui component for react",
"keywords": [ "keywords": [
"react", "react",

View File

@ -4,7 +4,7 @@ import Icon from "bee-icon";
import { ObjectAssign } from "./util"; import { ObjectAssign } from "./util";
import i18n from "./i18n"; import i18n from "./i18n";
import { getComponentLocale } from "bee-locale/build/tool"; import { getComponentLocale } from "bee-locale/build/tool";
import PropTypes from "prop-types";
function noop() {} function noop() {}
/** /**
* 参数: 过滤表头 * 参数: 过滤表头