add:添加一个DEMO29用于演示MODAL内弹出遮挡的问题

This commit is contained in:
kvkens 2018-12-10 15:56:01 +08:00
parent 05b3dd3af3
commit aff4151408
9 changed files with 2299 additions and 25 deletions

View File

@ -14,6 +14,7 @@
@import "../node_modules/bee-message/build/Message.css";
@import "../node_modules/bee-dropdown/build/Dropdown.css";
@import "../node_modules/bee-input-number/build/InputNumber.css";
@import "../node_modules/bee-modal/build/Modal.css";
@import "../src/Table.scss";

141
demo/demolist/Demo29.js Normal file
View File

@ -0,0 +1,141 @@
/**
*
* @title 从弹出框内显示过滤行
* @description
*
*/
import React, { Component } from 'react';
import Table from '../../src';
import Modal from 'bee-modal';
import Button from 'bee-button';
const columns29 = [
{ title: "姓名", width: 180, dataIndex: "name", key: "name", filterType: "text", filterDropdown: "show" },
{ title: "年龄", width: 150, dataIndex: "age", key: "age", filterType: "dropdown", filterDropdown: "show" },
{ title: "日期", width: 200, dataIndex: "date", key: "date", filterType: "date", filterDropdown: "show", format: "YYYY-MM-DD" },
{ title: "居住地址", width: 150, dataIndex: "address", key: "address", filterType: "dropdown", filterDropdown: "show" },
{ title: "备注", dataIndex: "mark", key: "mark" }
];
const data29 = [
{
key: "1",
name: "John Brown",
age: 32,
date: "2018-09-19",
address: "朝阳区",
mark: "无"
},
{
key: "2",
name: "Jim Green",
age: 40,
date: "2018-09-18",
address: "朝阳区",
mark: "无"
},
{
key: "3",
name: "Jim Green",
age: 40,
date: "2018-09-18",
address: "东城区",
mark: "无"
},
{
key: "4",
name: "Jim Green",
age: 40,
date: "2018-09-18",
address: "东城区",
mark: "无"
}, {
key: "5",
name: "John Brown",
age: 32,
date: "2018-09-18",
address: "海淀区",
mark: "无"
},
{
key: "6",
name: "Jim Green",
age: 48,
date: "2018-09-18",
address: "海淀区",
mark: "无"
},
{
key: "7",
name: "Jim Green",
age: 40,
date: "2018-09-18",
address: "海淀区",
mark: "无"
},
{
key: "8",
name: "Jim Green",
age: 38,
date: "2018-09-18",
address: "海淀区",
mark: "无"
}
];
class Demo29 extends Component {
constructor() {
super();
this.state = {
show: false
}
this.close = this.close.bind(this);
this.open = this.open.bind(this);
}
handlerFilterChange = (key, val, condition) => {
console.log('参数key=', key, ' value=', val, 'condition=', condition);
}
handlerFilterClear = (key) => {
console.log('清除条件', key);
}
close() {
this.setState({
show: false
});
}
open() {
this.setState({
show: true
});
}
render() {
return (<div><Modal
show={this.state.show}
onHide={this.close}
autoFocus={false}
enforceFocus={false}
>
<Modal.Header closeButton>
<Modal.Title>过滤行</Modal.Title>
</Modal.Header>
<Modal.Body>
<Table
onFilterChange={this.handlerFilterChange}//下拉条件的回调(key,val)=>()
onFilterClear={this.handlerFilterClear}//触发输入操作以及其他的回调(key,val)=>()
filterDelay={500}//输入文本多少ms触发回调函数默认300ms
filterable={true}//是否开启过滤数据功能
bordered
columns={columns29}
data={data29} />
</Modal.Body>
</Modal>
<Button colors="primary" onClick={this.open}>显示表格</Button>
</div>)
}
}
export default Demo29;

File diff suppressed because one or more lines are too long

13
dist/demo.css vendored
View File

@ -6,6 +6,7 @@
@import url(../node_modules/bee-message/build/Message.css);
@import url(../node_modules/bee-dropdown/build/Dropdown.css);
@import url(../node_modules/bee-input-number/build/InputNumber.css);
@import url(../node_modules/bee-modal/build/Modal.css);
.red {
color: rgb(244,67,54) !important; }
@ -8907,11 +8908,13 @@ ul {
top: 0px;
left: 3px; }
.u-filter-dropdown-menu-wrap .u-dropdown-menu li.u-dropdown-menu-item {
line-height: 32px;
height: 32px;
padding: 0px 16px 0 16px;
cursor: pointer; }
.u-filter-dropdown-menu-wrap {
z-index: 1800; }
.u-filter-dropdown-menu-wrap .u-dropdown-menu li.u-dropdown-menu-item {
line-height: 32px;
height: 32px;
padding: 0px 16px 0 16px;
cursor: pointer; }
.u-checkbox {
height: 16px;

2
dist/demo.css.map vendored

File diff suppressed because one or more lines are too long

2157
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

@ -56,15 +56,16 @@
"bee-loading": "^1.0.3",
"bee-locale": "0.0.11",
"bee-menus": "^1.0.7",
"bee-modal": "^1.0.9",
"bee-popover": "^1.0.2",
"bee-select": "^1.0.21",
"classnames": "^2.2.5",
"component-classes": "^1.2.6",
"lodash.clonedeep": "^4.5.0",
"object-path": "^0.11.3",
"shallowequal": "^1.0.2",
"throttle-debounce": "^2.0.1",
"tinper-bee-core": "latest",
"component-classes": "^1.2.6",
"warning": "^3.0.0"
},
"peerDependencies": {
@ -94,4 +95,4 @@
"react-addons-test-utils": "^15.5.0",
"react-dom": "^15.5.0"
}
}
}

View File

@ -684,6 +684,7 @@ $checkbox-height:16px;
}
.u-filter-dropdown-menu-wrap {
z-index: 1800;
.u-dropdown-menu {
li.u-dropdown-menu-item {
line-height: 32px;