This commit is contained in:
yangchch6 2019-04-18 09:51:55 +08:00
commit 41969fc745
17 changed files with 359 additions and 1213 deletions

View File

@ -4,7 +4,7 @@
font-size: 12px; font-size: 12px;
color: #212121; color: #212121;
position: relative; position: relative;
line-height: 1.5; line-height: 1.33;
overflow: hidden; } overflow: hidden; }
.u-table-body { .u-table-body {
position: relative; } position: relative; }
@ -47,13 +47,15 @@
background: rgb(235, 236, 240); } background: rgb(235, 236, 240); }
.u-table th, .u-table th,
.u-table td { .u-table td {
padding: 12px 8px; padding: 12px 16px;
word-break: break-all; } word-break: break-all; }
.u-table tr.filterable th { .u-table tr.filterable th {
padding-top: 5px !important; padding-top: 5px !important;
padding-bottom: 5px !important; } padding-bottom: 5px !important; }
.u-table tr.filterable th .filterContext { .u-table tr.filterable th .filterContext {
height: 35px; } height: 35px; }
.u-table tr.filterable th .u-select-selection--single {
height: 26px; }
.u-table-row-hover { .u-table-row-hover {
background: rgb(235, 236, 240); } background: rgb(235, 236, 240); }
.u-table-scroll { .u-table-scroll {
@ -80,7 +82,7 @@
background: rgb(241, 242, 245); background: rgb(241, 242, 245);
color: rgb(33, 33, 33); } color: rgb(33, 33, 33); }
.u-table.fixed-height td { .u-table.fixed-height td {
padding: 0px 8px; } padding: 0px 16px; }
.u-table-fixed-header .u-table-body { .u-table-fixed-header .u-table-body {
background: #fff; background: #fff;
position: relative; } position: relative; }
@ -98,17 +100,17 @@
overflow-y: scroll; overflow-y: scroll;
box-sizing: border-box; } box-sizing: border-box; }
.u-table-title { .u-table-title {
padding: 12px 8px; padding: 12px 16px;
border-top: 1px solid rgb(193, 199, 208); } border-top: 1px solid rgb(193, 199, 208); }
.u-table-content { .u-table-content {
position: relative; } position: relative; }
.u-table-footer { .u-table-footer {
padding: 12px 8px; padding: 12px 16px;
border-bottom: 1px solid rgb(193, 199, 208); } border-bottom: 1px solid rgb(193, 199, 208); }
.u-table-footer .u-table-scroll { .u-table-footer .u-table-scroll {
overflow-x: hidden; } overflow-x: hidden; }
.u-table-footer .u-table { .u-table-footer .u-table {
margin: -12px -8px; } margin: -12px -16px; }
.u-table-placeholder { .u-table-placeholder {
padding: 12px 8px; padding: 12px 8px;
background: #fff; background: #fff;
@ -219,13 +221,18 @@
.u-table-thead th .bee-table-column-sorter { .u-table-thead th .bee-table-column-sorter {
position: relative; position: relative;
margin-left: 4px; margin-left: 4px;
height: 1em; height: 16px;
vertical-align: middle; vertical-align: middle;
text-align: center; text-align: center;
display: inline-block; } display: inline-block;
margin-top: -3px; }
.u-table-thead th .bee-table-column-sorter i {
padding: 0px;
font-weight: 600;
color: #505F79; }
.u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-down, .u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-down,
.u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-up, .u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-flat { .u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-up, .u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-flat {
line-height: 6px; line-height: 16px;
display: block; display: block;
width: 34px; width: 34px;
cursor: pointer; } cursor: pointer; }
@ -296,17 +303,18 @@
position: relative; } position: relative; }
.u-table-filter-column-filter-icon { .u-table-filter-column-filter-icon {
position: absolute; position: absolute;
top: 8px; width: 30px;
right: 18px; height: 38px;
width: 22px; line-height: 38px;
height: 25px; right: 12px;
line-height: 25px; top: 1px;
z-index: 2; z-index: 2;
background: rgb(241, 242, 245); background: rgb(241, 242, 245);
text-align: center; text-align: center;
cursor: pointer; } cursor: pointer; }
.u-table-filter-column-filter-icon i.uf { .u-table-filter-column-filter-icon i.uf {
padding: 0px; } padding: 0px;
color: #505F79; }
.u-table-filter-column-pop-cont-item { .u-table-filter-column-pop-cont-item {
margin-top: 8px; margin-top: 8px;
cursor: pointer; } cursor: pointer; }
@ -329,9 +337,14 @@
display: none; display: none;
pointer-events: none; } pointer-events: none; }
.u-table .u-checkbox { .u-table .u-checkbox {
height: 16px; height: 14px;
line-height: 16px; line-height: 14px;
margin: 0px; } margin: 0px; }
.u-table .u-checkbox .u-checkbox-label {
line-height: 14px; }
.u-table .u-checkbox .u-checkbox-label:before, .u-table .u-checkbox .u-checkbox-label:after {
width: 14px;
height: 14px; }
.u-table:focus { .u-table:focus {
outline: none; outline: none;
@ -521,16 +534,16 @@
.u-filter-dropdown-menu-wrap { .u-filter-dropdown-menu-wrap {
z-index: 1800; } z-index: 1800; }
.u-filter-dropdown-menu-wrap .u-dropdown-menu li.u-dropdown-menu-item { .u-filter-dropdown-menu-wrap .u-dropdown-menu li.u-dropdown-menu-item {
line-height: 28px; line-height: 26px;
height: 28px; height: 26px;
padding: 0px 16px 0 16px; padding: 0px 16px 0 16px;
cursor: pointer; } cursor: pointer; }
.filter-wrap .u-form-control { .filter-wrap .u-form-control {
height: 28px; } height: 26px; }
.filter-wrap .u-input-number.u-input-group.simple .u-input-group-btn .icon-group { .filter-wrap .u-input-number.u-input-group.simple .u-input-group-btn .icon-group {
height: 28px; } height: 26px; }
.u-row-hover { .u-row-hover {
position: absolute; position: absolute;

View File

@ -490,6 +490,7 @@ function bigData(Table) {
if (!_this.props.expandedRowKeys) { if (!_this.props.expandedRowKeys) {
if (expandState) { if (expandState) {
expandedRowKeys.push(rowKey); expandedRowKeys.push(rowKey);
_this4.setState({ needRender: !needRender });
} else { } else {
var _index = -1; var _index = -1;
expandedRowKeys.forEach(function (r, i) { expandedRowKeys.forEach(function (r, i) {

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
@ -36,137 +36,137 @@ var cloneDeep = require('lodash.clonedeep');
function dragColumn(Table) { function dragColumn(Table) {
return function (_Component) { return function (_Component) {
_inherits(DragColumn, _Component); _inherits(DragColumn, _Component);
function DragColumn(props) { function DragColumn(props) {
_classCallCheck(this, DragColumn); _classCallCheck(this, DragColumn);
var _this = _possibleConstructorReturn(this, _Component.call(this, props)); var _this = _possibleConstructorReturn(this, _Component.call(this, props));
_this.setColumOrderByIndex = function (_column) { _this.setColumOrderByIndex = function (_column) {
_column.forEach(function (da, i) { _column.forEach(function (da, i) {
da.dragIndex = i; da.dragIndex = i;
da.drgHover = false; da.drgHover = false;
});
return _column;
};
_this.onDrop = function (event, data) {
var dragSource = data.dragSource,
dragTarg = data.dragTarg;
var columns = _this.state.columns;
var sourceIndex = -1,
targetIndex = -1;
sourceIndex = columns.findIndex(function (da, i) {
return da.key == dragSource.key;
});
targetIndex = columns.findIndex(function (da, i) {
return da.key == dragTarg.key;
});
// for (let index = 0; index < columns.length; index++) {
// const da = columns[index];
// if(da.key === dragSource.key){
// columns[index] = dragTargColum;
// }
// if(da.key === dragTarg.key){
// columns[index] = dragSourceColum;
// }
// }
// 向前移动
if (targetIndex < sourceIndex) {
targetIndex = targetIndex + 1;
}
columns.splice(targetIndex, 0, columns.splice(sourceIndex, 1)[0]);
_this.setState({
columns: cloneDeep(columns)
});
if (_this.props.onDrop) {
_this.props.onDrop(event, data, columns);
}
};
_this.getTarget = function (evt) {
return evt.target || evt.srcElement;
};
_this.state = {
columns: _this.setColumOrderByIndex(props.columns)
};
return _this;
}
DragColumn.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
if (nextProps.columns != this.props.columns) {
this.setState({
columns: this.setColumOrderByIndex(nextProps.columns)
});
}
};
DragColumn.prototype.cloneDeep = function cloneDeep(obj) {
if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || Object.keys(obj).length === 0) {
return obj;
}
var resultData = {};
return this.recursion(obj, resultData);
};
DragColumn.prototype.recursion = function (_recursion) {
function recursion(_x) {
return _recursion.apply(this, arguments);
}
recursion.toString = function () {
return _recursion.toString();
};
return recursion;
}(function (obj) {
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
for (key in obj) {
if (_typeof(obj[key]) == 'object' && Object.keys(obj[key].length > 0)) {
data[key] = recursion(obj[key]);
} else {
data[key] = obj[key];
}
}
return data;
}); });
return _column;
};
DragColumn.prototype.render = function render() { _this.onDrop = function (event, data) {
var _props = this.props, var dragSource = data.dragSource,
data = _props.data, dragTarg = data.dragTarg;
dragborder = _props.dragborder, var columns = _this.state.columns;
draggable = _props.draggable,
className = _props.className,
columns = _props.columns,
onDragStart = _props.onDragStart,
onDragEnter = _props.onDragEnter,
onDragOver = _props.onDragOver,
onDrop = _props.onDrop,
others = _objectWithoutProperties(_props, ['data', 'dragborder', 'draggable', 'className', 'columns', 'onDragStart', 'onDragEnter', 'onDragOver', 'onDrop']);
var key = new Date().getTime(); var sourceIndex = -1,
return _react2["default"].createElement(Table, _extends({}, others, { targetIndex = -1;
columns: this.state.columns,
data: data,
className: className + ' u-table-drag-border',
onDragStart: this.onDragStart,
onDragOver: this.onDragOver,
onDrop: this.onDrop,
onDragEnter: this.onDragEnter,
draggable: draggable,
dragborder: dragborder
// dragborder={false}
, dragborderKey: key
}));
};
return DragColumn; sourceIndex = columns.findIndex(function (da, i) {
}(_react.Component); return da.key == dragSource.key;
});
targetIndex = columns.findIndex(function (da, i) {
return da.key == dragTarg.key;
});
// for (let index = 0; index < columns.length; index++) {
// const da = columns[index];
// if(da.key === dragSource.key){
// columns[index] = dragTargColum;
// }
// if(da.key === dragTarg.key){
// columns[index] = dragSourceColum;
// }
// }
// 向前移动
if (targetIndex < sourceIndex) {
targetIndex = targetIndex + 1;
}
columns.splice(targetIndex, 0, columns.splice(sourceIndex, 1)[0]);
_this.setState({
columns: cloneDeep(columns)
});
if (_this.props.onDrop) {
_this.props.onDrop(event, data, columns);
}
};
_this.getTarget = function (evt) {
return evt.target || evt.srcElement;
};
_this.state = {
columns: _this.setColumOrderByIndex(props.columns)
};
return _this;
}
DragColumn.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
if (nextProps.columns != this.props.columns) {
this.setState({
columns: this.setColumOrderByIndex(nextProps.columns)
});
}
};
DragColumn.prototype.cloneDeep = function cloneDeep(obj) {
if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || Object.keys(obj).length === 0) {
return obj;
}
var resultData = {};
return this.recursion(obj, resultData);
};
DragColumn.prototype.recursion = function (_recursion) {
function recursion(_x) {
return _recursion.apply(this, arguments);
}
recursion.toString = function () {
return _recursion.toString();
};
return recursion;
}(function (obj) {
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
for (key in obj) {
if (_typeof(obj[key]) == 'object' && Object.keys(obj[key].length > 0)) {
data[key] = recursion(obj[key]);
} else {
data[key] = obj[key];
}
}
return data;
});
DragColumn.prototype.render = function render() {
var _props = this.props,
data = _props.data,
dragborder = _props.dragborder,
draggable = _props.draggable,
className = _props.className,
columns = _props.columns,
onDragStart = _props.onDragStart,
onDragEnter = _props.onDragEnter,
onDragOver = _props.onDragOver,
onDrop = _props.onDrop,
others = _objectWithoutProperties(_props, ['data', 'dragborder', 'draggable', 'className', 'columns', 'onDragStart', 'onDragEnter', 'onDragOver', 'onDrop']);
var key = new Date().getTime();
return _react2["default"].createElement(Table, _extends({}, others, {
columns: this.state.columns,
data: data,
className: className + ' u-table-drag-border',
onDragStart: this.onDragStart,
onDragOver: this.onDragOver,
onDrop: this.onDrop,
onDragEnter: this.onDragEnter,
draggable: draggable,
dragborder: dragborder
// dragborder={false}
, dragborderKey: key
}));
};
return DragColumn;
}(_react.Component);
} }
module.exports = exports['default']; module.exports = exports['default'];

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
@ -20,29 +20,29 @@ exports.ObjectAssign = ObjectAssign;
*/ */
function sortBy(arr, prop, desc) { function sortBy(arr, prop, desc) {
var props = [], var props = [],
ret = [], ret = [],
i = 0, i = 0,
len = arr.length; len = arr.length;
if (typeof prop == 'string') { if (typeof prop == 'string') {
for (; i < len; i++) { for (; i < len; i++) {
var oI = arr[i]; var oI = arr[i];
(props[i] = new String(oI && oI[prop] || ''))._obj = oI; (props[i] = new String(oI && oI[prop] || ''))._obj = oI;
}
} else if (typeof prop == 'function') {
for (; i < len; i++) {
var _oI = arr[i];
(props[i] = new String(_oI && prop(_oI) || ''))._obj = _oI;
}
} else {
throw '参数类型错误';
} }
} else if (typeof prop == 'function') { props.sort();
for (; i < len; i++) { for (i = 0; i < len; i++) {
var _oI = arr[i]; ret[i] = props[i]._obj;
(props[i] = new String(_oI && prop(_oI) || ''))._obj = _oI;
} }
} else { if (desc) ret.reverse();
throw '参数类型错误'; return ret;
}
props.sort();
for (i = 0; i < len; i++) {
ret[i] = props[i]._obj;
}
if (desc) ret.reverse();
return ret;
}; };
/** /**
@ -51,11 +51,11 @@ function sortBy(arr, prop, desc) {
* @param {} property * @param {} property
*/ */
function compare(property) { function compare(property) {
return function (a, b) { return function (a, b) {
var value1 = a[property]; var value1 = a[property];
var value2 = b[property]; var value2 = b[property];
return value1 - value2; return value1 - value2;
}; };
} }
/** /**
@ -63,17 +63,17 @@ function compare(property) {
* @param {*} obj 要拷贝的对象 * @param {*} obj 要拷贝的对象
*/ */
function ObjectAssign(obj) { function ObjectAssign(obj) {
var b = obj instanceof Array; var b = obj instanceof Array;
var tagObj = b ? [] : {}; var tagObj = b ? [] : {};
if (b) { if (b) {
//数组 //数组
obj.forEach(function (da) { obj.forEach(function (da) {
var _da = {}; var _da = {};
_extends(_da, da); _extends(_da, da);
tagObj.push(_da); tagObj.push(_da);
}); });
} else { } else {
_extends(tagObj, obj); _extends(tagObj, obj);
} }
return tagObj; return tagObj;
} }

View File

@ -13,7 +13,7 @@ const columns = [
{ {
title:'序号', title:'序号',
dataIndex:'index', dataIndex:'index',
width:'50', width:'60',
key:'index', key:'index',
render:(text,record,index)=>{ render:(text,record,index)=>{
return index return index

View File

@ -17,7 +17,7 @@ const columns = [
{ {
title:'序号', title:'序号',
dataIndex:'index', dataIndex:'index',
width:'50', width:'80',
key:'index', key:'index',
render:(text,record,index)=>{ render:(text,record,index)=>{
return index return index

View File

@ -1,10 +1,3 @@
/**
*
* @title 树状表滚动加载
* Tooltip
* @description
*/
import React, { Component } from "react"; import React, { Component } from "react";
import {Tooltip} from "tinper-bee"; import {Tooltip} from "tinper-bee";
@ -83,6 +76,7 @@ class Demo34 extends Component {
parentNodeId='parent' parentNodeId='parent'
scroll={{y:300}} scroll={{y:300}}
height={40} height={40}
onExpand={this.onExpand}
onRowClick={(record, index, indent) => { onRowClick={(record, index, indent) => {
console.log('currentIndex--'+index); console.log('currentIndex--'+index);
}} }}
@ -93,4 +87,4 @@ class Demo34 extends Component {
} }
} }
export default Demo34; export default Demo34;

View File

@ -17,7 +17,7 @@ const columns = [
title: "Name", title: "Name",
dataIndex: "name", dataIndex: "name",
key: "name", key: "name",
width: 100, width: 120,
fixed: "left" fixed: "left"
}, },
{ {

View File

@ -74,7 +74,7 @@ const columns24 = [
title: "武功类型", title: "武功类型",
dataIndex: "g", dataIndex: "g",
key: "g", key: "g",
width: 100 width: 150
}, },
{ {
title: "师傅", title: "师傅",

View File

@ -70,7 +70,7 @@ const data13 = [
//拼接成复杂功能的table组件不能在render中定义需要像此例子声明在组件的外侧不然操作state会导致功能出现异常 //拼接成复杂功能的table组件不能在render中定义需要像此例子声明在组件的外侧不然操作state会导致功能出现异常
let ComplexTable = multiSelect(sum(sort(Table, Icon)), Checkbox); let ComplexTable = multiSelect(sort(sum(Table, Icon)), Checkbox);
class Demo13 extends Component { class Demo13 extends Component {
constructor(props) { constructor(props) {

File diff suppressed because one or more lines are too long

55
dist/demo.css vendored
View File

@ -4,7 +4,7 @@
font-size: 12px; font-size: 12px;
color: #212121; color: #212121;
position: relative; position: relative;
line-height: 1.5; line-height: 1.33;
overflow: hidden; } overflow: hidden; }
.u-table-body { .u-table-body {
position: relative; } position: relative; }
@ -47,13 +47,15 @@
background: rgb(235, 236, 240); } background: rgb(235, 236, 240); }
.u-table th, .u-table th,
.u-table td { .u-table td {
padding: 12px 8px; padding: 12px 16px;
word-break: break-all; } word-break: break-all; }
.u-table tr.filterable th { .u-table tr.filterable th {
padding-top: 5px !important; padding-top: 5px !important;
padding-bottom: 5px !important; } padding-bottom: 5px !important; }
.u-table tr.filterable th .filterContext { .u-table tr.filterable th .filterContext {
height: 35px; } height: 35px; }
.u-table tr.filterable th .u-select-selection--single {
height: 26px; }
.u-table-row-hover { .u-table-row-hover {
background: rgb(235, 236, 240); } background: rgb(235, 236, 240); }
.u-table-scroll { .u-table-scroll {
@ -80,7 +82,7 @@
background: rgb(241, 242, 245); background: rgb(241, 242, 245);
color: rgb(33, 33, 33); } color: rgb(33, 33, 33); }
.u-table.fixed-height td { .u-table.fixed-height td {
padding: 0px 8px; } padding: 0px 16px; }
.u-table-fixed-header .u-table-body { .u-table-fixed-header .u-table-body {
background: #fff; background: #fff;
position: relative; } position: relative; }
@ -98,17 +100,17 @@
overflow-y: scroll; overflow-y: scroll;
box-sizing: border-box; } box-sizing: border-box; }
.u-table-title { .u-table-title {
padding: 12px 8px; padding: 12px 16px;
border-top: 1px solid rgb(193, 199, 208); } border-top: 1px solid rgb(193, 199, 208); }
.u-table-content { .u-table-content {
position: relative; } position: relative; }
.u-table-footer { .u-table-footer {
padding: 12px 8px; padding: 12px 16px;
border-bottom: 1px solid rgb(193, 199, 208); } border-bottom: 1px solid rgb(193, 199, 208); }
.u-table-footer .u-table-scroll { .u-table-footer .u-table-scroll {
overflow-x: hidden; } overflow-x: hidden; }
.u-table-footer .u-table { .u-table-footer .u-table {
margin: -12px -8px; } margin: -12px -16px; }
.u-table-placeholder { .u-table-placeholder {
padding: 12px 8px; padding: 12px 8px;
background: #fff; background: #fff;
@ -224,13 +226,18 @@
.u-table-thead th .bee-table-column-sorter { .u-table-thead th .bee-table-column-sorter {
position: relative; position: relative;
margin-left: 4px; margin-left: 4px;
height: 1em; height: 16px;
vertical-align: middle; vertical-align: middle;
text-align: center; text-align: center;
display: inline-block; } display: inline-block;
margin-top: -3px; }
.u-table-thead th .bee-table-column-sorter i {
padding: 0px;
font-weight: 600;
color: #505F79; }
.u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-down, .u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-down,
.u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-up, .u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-flat { .u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-up, .u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-flat {
line-height: 6px; line-height: 16px;
display: block; display: block;
width: 34px; width: 34px;
cursor: pointer; } cursor: pointer; }
@ -298,17 +305,18 @@
position: relative; } position: relative; }
.u-table-filter-column-filter-icon { .u-table-filter-column-filter-icon {
position: absolute; position: absolute;
top: 8px; width: 30px;
right: 18px; height: 38px;
width: 22px; line-height: 38px;
height: 25px; right: 12px;
line-height: 25px; top: 1px;
z-index: 2; z-index: 2;
background: rgb(241, 242, 245); background: rgb(241, 242, 245);
text-align: center; text-align: center;
cursor: pointer; } cursor: pointer; }
.u-table-filter-column-filter-icon i.uf { .u-table-filter-column-filter-icon i.uf {
padding: 0px; } padding: 0px;
color: #505F79; }
.u-table-filter-column-pop-cont-item { .u-table-filter-column-pop-cont-item {
margin-top: 8px; margin-top: 8px;
cursor: pointer; } cursor: pointer; }
@ -331,9 +339,14 @@
display: none; display: none;
pointer-events: none; } pointer-events: none; }
.u-table .u-checkbox { .u-table .u-checkbox {
height: 16px; height: 14px;
line-height: 16px; line-height: 14px;
margin: 0px; } margin: 0px; }
.u-table .u-checkbox .u-checkbox-label {
line-height: 14px; }
.u-table .u-checkbox .u-checkbox-label:before, .u-table .u-checkbox .u-checkbox-label:after {
width: 14px;
height: 14px; }
.u-table:focus { .u-table:focus {
outline: none; outline: none;
@ -523,16 +536,16 @@
.u-filter-dropdown-menu-wrap { .u-filter-dropdown-menu-wrap {
z-index: 1800; } z-index: 1800; }
.u-filter-dropdown-menu-wrap .u-dropdown-menu li.u-dropdown-menu-item { .u-filter-dropdown-menu-wrap .u-dropdown-menu li.u-dropdown-menu-item {
line-height: 28px; line-height: 26px;
height: 28px; height: 26px;
padding: 0px 16px 0 16px; padding: 0px 16px 0 16px;
cursor: pointer; } cursor: pointer; }
.filter-wrap .u-form-control { .filter-wrap .u-form-control {
height: 28px; } height: 26px; }
.filter-wrap .u-input-number.u-input-group.simple .u-input-group-btn .icon-group { .filter-wrap .u-input-number.u-input-group.simple .u-input-group-btn .icon-group {
height: 28px; } height: 26px; }
.u-row-hover { .u-row-hover {
position: absolute; position: absolute;

2
dist/demo.css.map vendored

File diff suppressed because one or more lines are too long

1058
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

@ -4,22 +4,23 @@
$text-color: $font-color-base; $text-color: $font-color-base;
$font-size-base: 12px; $font-size-base: 12px;
$line-height: 1.5; $line-height: 1.33;
// 主题定制border // 主题定制border
$table-border-color: unquote("rgb(#{$table-border-color-base})"); $table-border-color: unquote("rgb(#{$table-border-color-base})");
// $table-head-background-color: #f7f7f7; // $table-head-background-color: #f7f7f7;
// $table-head-text-color: #666; // $table-head-text-color: #666;
$vertical-padding: 12px; $vertical-padding: 12px;
$horizontal-padding: 8px; $horizontal-padding: 16px;
// $table-border-color: #e9e9e9; // $table-border-color: #e9e9e9;
$table-hover-color: #E7F2FC; $table-hover-color: #E7F2FC;
$table-move-in-color: $bg-color-base; $table-move-in-color: $bg-color-base;
$checkbox-height:16px; $checkbox-height:14px;
$table-th-bottom-border:#C1C7D0; $table-th-bottom-border:#C1C7D0;
$filter-form-control-height:28px; $filter-form-control-height:26px;
$table-head-font-weight: bold; $table-head-font-weight: bold;
$icon-color:#505F79;
.u-table { .u-table {
font-size: $font-size-base; font-size: $font-size-base;
color: $text-color; color: $text-color;
@ -115,6 +116,9 @@ $table-head-font-weight: bold;
.filterContext{ .filterContext{
height: 35px; height: 35px;
} }
.u-select-selection--single{
height: 26px;
}
} }
} }
} }
@ -166,7 +170,7 @@ $table-head-font-weight: bold;
} }
&.fixed-height td { &.fixed-height td {
padding: 0px 8px; padding: 0px $horizontal-padding;
} }
&-fixed-header &-body { &-fixed-header &-body {
@ -389,14 +393,20 @@ $table-head-font-weight: bold;
.bee-table-column-sorter { .bee-table-column-sorter {
position: relative; position: relative;
margin-left: 4px; margin-left: 4px;
height: 1em; height: 16px;
vertical-align: middle; vertical-align: middle;
text-align: center; text-align: center;
display: inline-block; display: inline-block;
margin-top: -3px;
i{
padding: 0px;
font-weight: 600;
color: $icon-color;
}
& > .bee-table-column-sorter-down, & > .bee-table-column-sorter-down,
& > .bee-table-column-sorter-up, & > .bee-table-column-sorter-flat { & > .bee-table-column-sorter-up, & > .bee-table-column-sorter-flat {
line-height: 6px; line-height: 16px;
display: block; display: block;
width: 34px; width: 34px;
cursor: pointer; cursor: pointer;
@ -444,6 +454,7 @@ $table-head-font-weight: bold;
} }
.th-drag:hover{ .th-drag:hover{
background: $hover-bg-color-base; background: $hover-bg-color-base;
} }
//为了区分是拖拽宽度还是交换列先注释上面了 //为了区分是拖拽宽度还是交换列先注释上面了
// .th-drag:hover{ // .th-drag:hover{
@ -512,17 +523,18 @@ $table-head-font-weight: bold;
} }
&-filter-icon{ &-filter-icon{
position: absolute; position: absolute;
top: 8px; width: 30px;
right: 18px; height: 38px ;
width: 22px; line-height: 38px;
height: 25px; right: 12px ;
line-height: 25px; top:1px ;
z-index: 2; z-index: 2;
background: $table-head-background-color; background: $table-head-background-color;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
i.uf{ i.uf{
padding: 0px; padding: 0px;
color: $icon-color;
} }
} }
&-pop-cont-item{ &-pop-cont-item{
@ -561,6 +573,13 @@ $table-head-font-weight: bold;
height: $checkbox-height; height: $checkbox-height;
line-height: $checkbox-height; line-height: $checkbox-height;
margin:0px; margin:0px;
.u-checkbox-label{
line-height: $checkbox-height;
&:before,&:after {
width: $checkbox-height;
height: $checkbox-height;
}
}
} }
} }
.u-table:focus{ .u-table:focus{

View File

@ -390,7 +390,7 @@ export default function bigData(Table) {
if(!_this.props.expandedRowKeys){ if(!_this.props.expandedRowKeys){
if(expandState){ if(expandState){
expandedRowKeys.push(rowKey); expandedRowKeys.push(rowKey);
this.setState({ needRender: !needRender });
}else{ }else{
let index = -1; let index = -1;
expandedRowKeys.forEach((r, i) => { expandedRowKeys.forEach((r, i) => {