Skip to content

Commit

Permalink
2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yangchch6 committed Sep 4, 2019
1 parent 40bf3da commit d9bc793
Show file tree
Hide file tree
Showing 9 changed files with 113 additions and 67 deletions.
60 changes: 31 additions & 29 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,4 @@
## tinper-bee 2.2.0
- [email protected]
- 🐞 [Fixbug]数据动态改变,表体显示空白的问题。
- 🐞 [Fixbug]设置属性`showHeader={false}`, 在多选框后面出现空白padding。[#287](https://github.com/iuap-design/tinper-bee/issues/287)
- [email protected]
- 🐞 [Fixbug] 解决了右侧固定列无法使用扩展功能的问题。[#298](https://github.com/iuap-design/tinper-bee/issues/298)
- 🐞 [Fixbug]解决滚动加载场景,数据显示不全的问题。
- 🐞 [Fixbug]大数据量滚动加载场景,合并表格行时,出现样式错乱问题。
- 💄 [Update]`bodyDisplayInRow``headerDisplayInRow` 默认值设为 `true` ,即默认内容不换行,以省略号形式展现。
- 🌟 [Feature]新增Table属性 `showRowNum` 展示序号列,默认为 `false`,设置为 `true` 时使用默认配置。自定义配置时需传入 `showRowNum` 对象。
- 💄 [Update]点击行时同时触发点击勾选框的勾选或取消勾选。
- 🌟 [Feature]新增Column属性 `sortEnable`,开启默认排序
默认值为 `false`(不排序)
设置为 `true` 时,若设置 fieldType='number' ,则按数字排序,否则按字符串排序。
优先级低于sorter属性
- 🌟 [Feature] Column新增 fieldType='link' 类型数据,可渲染url链接
需在column中配置 `linkConfig` 属性
该属性的渲染优先级低于render,即有 render 时设置不渲染为link类型。
- [email protected]
- 💄 [Update]树形表支持多选。
- 🌟 [Feature]新增table属性 `autoSelect` ,在树型表中开启联动勾选
- 🌟 [Feature]fieldType属性新增 `stringChinese` 类型,供中文排序使用,渲染同string
- 💄 [Update]showRowNum 属性将不会改变数据源
- 🌟 [Feature]fieldType属性新增 `select` 类型,控制下拉类型的渲染
- 🌟 [Feature]column新增 `isShow` 属性,控制该列是否展示
- 🌟 [Feature]column新增 `cellMenu` 属性,展示单元格内菜单
- 🐞 [Fixbug]解决树表和行拖拽组合场景,图标重叠问题。[#325]
- 🌟 [Feature]增加 `onBodyScroll` 回调函数,在表体滚动时返回可视区最后一条数据的 index。
- [email protected]
- 🌟 [Feature]树形表支持多级懒加载。
- [email protected]
- 🌟 [Feature]增加 getScrollContainer 属性,自定义滚动事件监听的容器。
- 🐞 [Fixbug]滑动过程中出现层级结构错乱。
Expand Down Expand Up @@ -56,6 +27,37 @@
- [email protected]
- 🐞 [Fixbug]解决了当bee-form包裹时,选中项不能显示的问题。[#317](https://github.com/iuap-design/tinper-bee/issues/317)
- 💄 [Update]将 Radio 的三种状态(focus、selected、取消选中)统一为一种表现形式。[#260](https://github.com/iuap-design/tinper-bee/issues/260)
- [email protected]
- 🐞 [Fixbug]数据动态改变,表体显示空白的问题。
- 🐞 [Fixbug]设置属性`showHeader={false}`, 在多选框后面出现空白padding。[#287](https://github.com/iuap-design/tinper-bee/issues/287)
- [email protected]
- 🐞 [Fixbug] 解决了右侧固定列无法使用扩展功能的问题。[#298](https://github.com/iuap-design/tinper-bee/issues/298)
- 🐞 [Fixbug]解决滚动加载场景,数据显示不全的问题。
- 🐞 [Fixbug]大数据量滚动加载场景,合并表格行时,出现样式错乱问题。
- 💄 [Update]`bodyDisplayInRow``headerDisplayInRow` 默认值设为 `true` ,即默认内容不换行,以省略号形式展现。
- 🌟 [Feature]新增Table属性 `showRowNum` 展示序号列,默认为 `false`,设置为 `true` 时使用默认配置。自定义配置时需传入 `showRowNum` 对象。
- 💄 [Update]点击行时同时触发点击勾选框的勾选或取消勾选。
- 🌟 [Feature]新增Column属性 `sortEnable`,开启默认排序
默认值为 `false`(不排序)
设置为 `true` 时,若设置 fieldType='number' ,则按数字排序,否则按字符串排序。
优先级低于sorter属性
- 🌟 [Feature] Column新增 fieldType='link' 类型数据,可渲染url链接
需在column中配置 `linkConfig` 属性
该属性的渲染优先级低于render,即有 render 时设置不渲染为link类型。
- [email protected]
- 💄 [Update]树形表支持多选。
- 🌟 [Feature]新增table属性 `autoSelect` ,在树型表中开启联动勾选
- 🌟 [Feature]fieldType属性新增 `stringChinese` 类型,供中文排序使用,渲染同string
- 💄 [Update]showRowNum 属性将不会改变数据源
- 🌟 [Feature]fieldType属性新增 `select` 类型,控制下拉类型的渲染
- 🌟 [Feature]column新增 `isShow` 属性,控制该列是否展示
- 🌟 [Feature]column新增 `cellMenu` 属性,展示单元格内菜单
- 🐞 [Fixbug]解决树表和行拖拽组合场景,图标重叠问题。[#325]
- 🌟 [Feature]增加 `onBodyScroll` 回调函数,在表体滚动时返回可视区最后一条数据的 index。
- [email protected]
- 🌟 [Feature]树形表支持多级懒加载。
- 🌟 [Feature]增加 `autoCheckedByClickRows` 参数,设置行点击事件是否自动勾选复选框。
- 💄 [Update]`headerDisplayInRow``height` 同时使用的情况做了处理,从组件层面避免错行。


## tinper-bee 2.1.6
Expand Down
2 changes: 1 addition & 1 deletion assets/theme/tinper-bee-blue.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/theme/tinper-bee-indigo.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/theme/tinper-bee-lightBlue.css

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions build/tinper-bee.js
Original file line number Diff line number Diff line change
Expand Up @@ -67848,7 +67848,7 @@ var PageLayout = __webpack_require__(1729);
// var Carousel = require('./lib/Carousel');

var TinperBee = {
version: '2.1.6',
version: '2.2.0',
Slider: Slider,
AutoComplete: AutoComplete,
// Carousel:Carousel,
Expand Down Expand Up @@ -140250,7 +140250,7 @@ var Table = function (_Component) {

onHoverProps.onHover = this.handleRowHover;

if (props.height) {
if (props.bodyDisplayInRow && props.height) {
height = props.height;
} else if (fixed || props.heightConsistent) {
height = fixedColumnsBodyRowsHeight[fixedIndex];
Expand Down Expand Up @@ -140701,7 +140701,8 @@ var Table = function (_Component) {
height = _props8.height,
headerHeight = _props8.headerHeight,
columns = _props8.columns,
heightConsistent = _props8.heightConsistent;
heightConsistent = _props8.heightConsistent,
bodyDisplayInRow = _props8.bodyDisplayInRow;

var headRows = this.headTable ? this.headTable.querySelectorAll('thead') : this.bodyTable.querySelectorAll('thead');
var bodyRows = this.bodyTable.querySelectorAll('.' + clsPrefix + '-row') || [];
Expand All @@ -140716,11 +140717,12 @@ var Table = function (_Component) {
});
var fixedColumnsBodyRowsHeight = [].map.call(bodyRows, function (row, index) {
var rsHeight = height;
if (rsHeight) {
if (bodyDisplayInRow && rsHeight) {
return rsHeight;
} else {
// 为了提高性能,默认获取主表的高度,但是有的场景中固定列的高度比主表的高度高,所以提供此属性,会统计所有列的高度取最大的,设置
if (heightConsistent) {
// 内容折行显示,并又设置了 height 的情况下,也要获取主表高度
if (heightConsistent || !bodyDisplayInRow && rsHeight) {
var leftHeight = void 0,
rightHeight = void 0,
currentHeight = void 0,
Expand Down Expand Up @@ -140903,7 +140905,8 @@ var Table = function (_Component) {
}
className += ' ' + clsPrefix + '-scroll-position-' + this.state.scrollPosition;
//如果传入height说明是固定高度
if (props.height) {
//内容过多折行显示时,height 属性会失效,为了避免产生错行
if (props.bodyDisplayInRow && props.height) {
className += ' fixed-height';
}
if (props.bodyDisplayInRow) {
Expand Down
2 changes: 1 addition & 1 deletion build/tinper-bee.min.js

Large diffs are not rendered by default.

33 changes: 22 additions & 11 deletions lib/multiSelect.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"use strict";
'use strict';

Object.defineProperty(exports, "__esModule", {
value: true
Expand All @@ -8,11 +8,15 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument

exports["default"] = multiSelect;

var _react = require("react");
var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _util = require("./util");
var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _util = require('./util');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

Expand Down Expand Up @@ -152,10 +156,13 @@ function multiSelect(Table, Checkbox) {
};

return MultiSelect;
}(_react.Component), _class.defaultProps = {
}(_react.Component), _class.propTypes = {
autoCheckedByClickRows: _propTypes2["default"].bool //行点击时,是否自动勾选复选框
}, _class.defaultProps = {
prefixCls: "u-table-mult-select",
getSelectedDataFunc: function getSelectedDataFunc() {},
autoSelect: false
autoSelect: false,
autoCheckedByClickRows: true
}, _initialiseProps = function _initialiseProps() {
var _this2 = this;

Expand Down Expand Up @@ -314,7 +321,7 @@ function multiSelect(Table, Checkbox) {
var _defaultColumns = [{
className: 'u-table-multiSelect-column',
title: _react2["default"].createElement(Checkbox, _extends({
className: "table-checkbox"
className: 'table-checkbox'
}, checkAttr, {
disabled: disabledCount == dataLength ? true : false,
onChange: _this2.onAllCheckChange
Expand All @@ -328,7 +335,7 @@ function multiSelect(Table, Checkbox) {
record._disabled ? attr.disabled = record._disabled : "";
return _react2["default"].createElement(Checkbox, _extends({
key: index,
className: "table-checkbox"
className: 'table-checkbox'
}, attr, {
checked: record._checked,
onClick: _this2.handleClick,
Expand All @@ -340,11 +347,15 @@ function multiSelect(Table, Checkbox) {
};

this.onRowClick = function (record, index, event) {
_this2.onCheckboxChange('', record, index)();
if (_this2.props.onRowClick) {
_this2.props.onRowClick(record, index, event);
var _props2 = _this2.props,
autoCheckedByClickRows = _props2.autoCheckedByClickRows,
onRowClick = _props2.onRowClick;

if (autoCheckedByClickRows) {
_this2.onCheckboxChange('', record, index)();
}
onRowClick && onRowClick(record, index, event);
};
}, _temp;
}
module.exports = exports["default"];
module.exports = exports['default'];
58 changes: 44 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tinper-bee",
"version": "2.1.6",
"version": "2.2.0",
"description": "React Components living for enterprise-class pc backend application",
"main": "environment.js",
"scripts": {
Expand Down Expand Up @@ -127,7 +127,7 @@
"bee-navbar": "2.0.0",
"bee-notification": "2.0.2",
"bee-overlay": "1.0.31",
"bee-page-layout": "^1.0.1",
"bee-page-layout": "1.0.1",
"bee-pagination": "2.0.9",
"bee-panel": "2.0.1",
"bee-popconfirm": "2.0.0",
Expand All @@ -140,7 +140,7 @@
"bee-slider": "2.0.1",
"bee-step": "2.0.1",
"bee-switch": "2.0.6",
"bee-table": "^2.2.7",
"bee-table": "2.2.9",
"bee-tabs": "2.1.1",
"bee-tag": "0.0.3",
"bee-tile": "1.0.0",
Expand Down

0 comments on commit d9bc793

Please sign in to comment.