publish 1.2.6

This commit is contained in:
jonyshi 2018-07-04 15:55:48 +08:00
parent 43e153bf04
commit 8b82f30e48
13 changed files with 278 additions and 237 deletions

View File

@ -187,17 +187,7 @@ import multiSelect from "bee-table/build/lib/multiSelect.js"
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 |
| ------ | ---------- | -------- | ---- | | ------ | ---------- | -------- | ---- |
| draggable | 当前表格可拖拽 | boolean | false | | draggable | 当前表格可拖拽 | boolean | false |
### 拖拽变更宽度
目前支持此功能只支持普通表格【注不支持tree结构的表头、不支持和表头拖拽交互列一起使用】[示例](https://github.com/tinper-bee/bee-table/tree/master/demo/demolist/Demo23.js)
| 参数 | 说明 | 类型 | 默认值 |
| ------ | ---------- | -------- | ---- |
| dragborder | 当前表格可拖拽改变宽度 | boolean | false |
## rendertype ## rendertype

View File

@ -78,8 +78,9 @@ function dragColumn(Table) {
onDragOver: this.onDragOver, onDragOver: this.onDragOver,
onDrop: this.onDrop, onDrop: this.onDrop,
onDragEnter: this.onDragEnter, onDragEnter: this.onDragEnter,
draggable: draggable, draggable: draggable
dragborder: dragborder, // dragborder={dragborder}
, dragborder: false,
dragborderKey: key dragborderKey: key
})); }));
}; };

View File

@ -33,7 +33,6 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
/** /**
* 参数: 过滤表头 * 参数: 过滤表头
* @param {*} Table * @param {*} Table
* @param {*} Checkbox
* @param {*} Popover * @param {*} Popover
* @param {*} Icon * @param {*} Icon
*/ */
@ -69,7 +68,7 @@ function filterColumn(Table, Popover) {
FilterColumn.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { FilterColumn.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
this.setState({ this.setState({
showPopover: false showModal: false
}); });
}; };
@ -133,24 +132,13 @@ function filterColumn(Table, Popover) {
}, _initialiseProps = function _initialiseProps() { }, _initialiseProps = function _initialiseProps() {
var _this2 = this; var _this2 = this;
this.getShowModal = function (event) {
var showModal = _this2.state.showModal;
if (showModal) {
_this2.setState({
showModal: false
});
}
};
this.checkedColumItemClick = function (da) { this.checkedColumItemClick = function (da) {
da.checked = da.checked ? false : true; da.checked = da.checked ? false : true;
da.disable = da.checked ? true : false; da.disable = da.checked ? true : false;
_this2.setState(_extends({}, _this2.state)); _this2.setState(_extends({}, _this2.state));
}; };
this.openCloumList = function (ev) { this.openCloumList = function () {
var oEvent = ev || event;
_this2.setState({ _this2.setState({
showModal: true showModal: true
}); });

View File

@ -22,6 +22,10 @@
} }
.demo25{ .demo25{
width: 500px; width: 700px;
height: 100%; height: 100%;
.u-table-filter-column-filter-icon{
right: 15px;
}
} }

View File

@ -192,16 +192,30 @@ const dataList = [
confirmState_name:"aaaa", confirmState_name:"aaaa",
closeState_name:"vnnnnn", closeState_name:"vnnnnn",
d:"操作", d:"操作",
key: "2" key: "1"
}, },
{
index: 2,
orderCode:"222",
supplierName: "22xxx",
type_name: "1223",
purchasing:'内行2',
purchasingGroup:"3223",
voucherDate:"222kk",
approvalState_name:"22vvvv",
confirmState_name:"2aaaa",
closeState_name:"2vnnnnn",
d:"2操作",
key: "2"
},
] ]
// const FilterColumnTable = filterColumn(Table, Popover); // const DragColumnTable = filterColumn(Table, Popover);
// const MultiSelectTable = multiSelect(Table, Checkbox); // const DragColumnTable = multiSelect(Table, Checkbox);
// let ComplexTable = multiSelect(Table, Checkbox); // let ComplexTable = multiSelect(Table, Checkbox);
// const DragColumnTable = multiSelect(Table, Checkbox); // const DragColumnTable = multiSelect(Table, Checkbox);
const DragColumnTable = dragColumn(filterColumn(multiSelect(Table, Checkbox), Popover)); const DragColumnTable = filterColumn(multiSelect(Table, Checkbox), Popover);
// const DragColumnTable = dragColumn(filterColumn(Table, Popover)); // const DragColumnTable = dragColumn(filterColumn(Table, Popover));
const defaultProps25 = { const defaultProps25 = {
@ -234,9 +248,9 @@ class Demo25 extends Component {
data={dataList} data={dataList}
getSelectedDataFunc={this.getSelectedDataFunc} getSelectedDataFunc={this.getSelectedDataFunc}
bordered bordered
dragborder={true} // dragborder={true}
scroll={{x:this.getCloumnsScroll(columns)}}
multiSelect={{type: "checkbox"}} multiSelect={{type: "checkbox"}}
scroll={{x:this.getCloumnsScroll(columns), y: 150}}
/></div> /></div>
} }
} }

File diff suppressed because one or more lines are too long

4
dist/demo.css vendored
View File

@ -9692,7 +9692,9 @@ li.rc-time-picker-panel-select-option-disabled:hover {
background: #e3f2fd; } background: #e3f2fd; }
.demo25 { .demo25 {
width: 500px; width: 700px;
height: 100%; } height: 100%; }
.demo25 .u-table-filter-column-filter-icon {
right: 15px; }
/*# sourceMappingURL=demo.css.map */ /*# sourceMappingURL=demo.css.map */

2
dist/demo.css.map vendored

File diff suppressed because one or more lines are too long

432
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.2.5", "version": "1.2.6",
"description": "Table ui component for react", "description": "Table ui component for react",
"keywords": [ "keywords": [
"react", "react",

View File

@ -106,7 +106,8 @@ export default function dragColumn(Table) {
onDrop={this.onDrop} onDrop={this.onDrop}
onDragEnter={this.onDragEnter} onDragEnter={this.onDragEnter}
draggable={draggable} draggable={draggable}
dragborder={dragborder} // dragborder={dragborder}
dragborder={false}
dragborderKey={key} dragborderKey={key}
/>) />)
} }

View File

@ -4,7 +4,6 @@ import Icon from "bee-icon";
/** /**
* 参数: 过滤表头 * 参数: 过滤表头
* @param {*} Table * @param {*} Table
* @param {*} Checkbox
* @param {*} Popover * @param {*} Popover
* @param {*} Icon * @param {*} Icon
*/ */
@ -37,7 +36,7 @@ export default function filterColumn(Table,Popover) {
showModal:false showModal:false
}) })
} }
checkedColumItemClick = (da)=>{ checkedColumItemClick = (da)=>{
da.checked = da.checked?false:true; da.checked = da.checked?false:true;
da.disable = da.checked?true:false; da.disable = da.checked?true:false;