提交 0365ebf3 authored 作者: 钟是志's avatar 钟是志

将登录组件抽到 webpublic 里面

上级 ec3ba400
...@@ -208,6 +208,7 @@ export default class List extends Component { ...@@ -208,6 +208,7 @@ export default class List extends Component {
const { formValues, selectRows, list, pagination, loading } = this.state; const { formValues, selectRows, list, pagination, loading } = this.state;
const { listConfig, pageSearch, pageButton ,children, addFields} = this.props; const { listConfig, pageSearch, pageButton ,children, addFields} = this.props;
const { columns, search } = pageSearch; const { columns, search } = pageSearch;
const columnsLength = columns.length;
for(let item of columns){ for(let item of columns){
if(typeof item.renderConfig !== 'undefined' && !item.render){ if(typeof item.renderConfig !== 'undefined' && !item.render){
item.render = (text,record)=>{ item.render = (text,record)=>{
...@@ -254,6 +255,9 @@ export default class List extends Component { ...@@ -254,6 +255,9 @@ export default class List extends Component {
} }
} }
} }
if(columnsLength > 10 && item.title && !item.width){
item.width = item.title.length * 30;
}
} }
let data = list; let data = list;
...@@ -271,7 +275,6 @@ export default class List extends Component { ...@@ -271,7 +275,6 @@ export default class List extends Component {
} }
} }
} }
const tableProps = { const tableProps = {
rowKey: pageSearch.tableRowKey || 'id', rowKey: pageSearch.tableRowKey || 'id',
selectedRows: selectRows, selectedRows: selectRows,
......
...@@ -259,6 +259,8 @@ export default class List extends Component { ...@@ -259,6 +259,8 @@ export default class List extends Component {
const { formValues, selectRows, list, pagination, loading } = this.state; const { formValues, selectRows, list, pagination, loading } = this.state;
const { listConfig, pageSearch, pageButton ,children, addFields} = this.props; const { listConfig, pageSearch, pageButton ,children, addFields} = this.props;
const { columns, search } = pageSearch; const { columns, search } = pageSearch;
const columnsLength = columns.length;
for(let item of columns){ for(let item of columns){
if(typeof item.renderConfig !== 'undefined' && !item.render){ if(typeof item.renderConfig !== 'undefined' && !item.render){
item.render = (text,record)=>{ item.render = (text,record)=>{
...@@ -306,6 +308,10 @@ export default class List extends Component { ...@@ -306,6 +308,10 @@ export default class List extends Component {
} }
} }
} }
if(columnsLength > 10 && item.title && !item.width){
item.width = item.title.length * 30;
}
} }
let data = list; let data = list;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论