提交 ff62637b authored 作者: 徐立's avatar 徐立

修复滚动bug

上级 c401787e
......@@ -425,7 +425,7 @@ class FormList extends React.Component {
this.columns = this.props.value.columns;
let cacheList = [];
let cacheChecked = [];
console.log(this.props.value.columns)
console.log(this.props.value.columns);
// 表头筛选逻辑
Array.isArray(this.props.value.columns) &&
this.props.value.columns.map(item => {
......@@ -436,7 +436,7 @@ class FormList extends React.Component {
cacheChecked.push(item.dataIndex);
});
this.checkList = cacheList;
this.setState({
checkedList: cacheChecked,
cacheColumns: cloneDeep(this.props.value.columns),
......@@ -1117,10 +1117,10 @@ class FormList extends React.Component {
valueName,
notShowBack,
istableCom, // 是否有模板设计器调用
value:{btns},
loading
value: { btns },
loading,
} = this.props;
const { showMobileDiv, isView } = this.state;
let scrollWidth = document.documentElement.clientWidth || document.body.clientWidth; //可使宽度
......@@ -1283,7 +1283,9 @@ class FormList extends React.Component {
返回
</Button>
)}
{btns&&btns.before&&btns.before.length>0?btns.before.map((r)=><Button {...r} loading={loading}/>):""}
{btns && btns.before && btns.before.length > 0
? btns.before.map(r => <Button {...r} loading={loading} />)
: ''}
{rights && !rights.includes('add') ? (
''
) : (
......@@ -1365,24 +1367,38 @@ class FormList extends React.Component {
</Button>
</Popover>
)}
{btns&&btns.after&&btns.after.length>0?btns.after.map((r)=><Button {...r} loading={loading}/>):""}
{btns && btns.after && btns.after.length > 0
? btns.after.map(r => <Button {...r} loading={loading} />)
: ''}
</div>
{!istableCom || (this.props.value && this.props.value.columns) ? (
<StandardTable
showHeader={this.props.showHeader != null ? this.props.showHeader : true}
noSelectRow={
this.props.onSelectRow == null && (rights == null || !rights.includes('delete'))
}
rowKey="id"
data={data}
isHiddenPage={this.props.isHiddenPage != null ? this.props.isHiddenPage : false}
columns={this.columns}
scroll={this.props.value && this.props.value.columns ? {} : { x: AllWidth }}
selectedRows={selectedRows}
onSelectRow={this.handleSelectRows}
onChange={this.handleStandardTableChange}
loading={this.props.loading}
/>
<div
id="mobelDiv"
style={{
overflow: 'hidden',
width: isMobile ? showMobileDiv : showDiv,
height: '100%',
}}
>
{showDiv && (
<StandardTable
showHeader={this.props.showHeader != null ? this.props.showHeader : true}
noSelectRow={
this.props.onSelectRow == null &&
(rights == null || !rights.includes('delete'))
}
rowKey="id"
data={data}
isHiddenPage={this.props.isHiddenPage != null ? this.props.isHiddenPage : false}
columns={this.columns}
scroll={{ x: AllWidth }}
selectedRows={selectedRows}
onSelectRow={this.handleSelectRows}
onChange={this.handleStandardTableChange}
loading={this.props.loading}
/>
)}
</div>
) : (
<div
id="mobelDiv"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论