From 7c2ec98824a939ddd45569dedc19ef967a379818 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 23 Oct 2017 16:38:53 +0800 Subject: [PATCH] update styles --- src/layouts/BasicLayout.less | 2 +- src/routes/List/TableList.js | 94 +++++++++++++++------------------- src/routes/List/TableList.less | 22 ++++---- 3 files changed, 51 insertions(+), 67 deletions(-) diff --git a/src/layouts/BasicLayout.less b/src/layouts/BasicLayout.less index 5aa45bc3..91ad7d99 100644 --- a/src/layouts/BasicLayout.less +++ b/src/layouts/BasicLayout.less @@ -11,7 +11,7 @@ height: 64px; position: relative; line-height: 64px; - padding-left: 32px; + padding-left: 24px; transition: all .3s; background: #002140; overflow: hidden; diff --git a/src/routes/List/TableList.js b/src/routes/List/TableList.js index 844d0beb..0ca42b24 100644 --- a/src/routes/List/TableList.js +++ b/src/routes/List/TableList.js @@ -1,6 +1,6 @@ import React, { PureComponent } from 'react'; import { connect } from 'dva'; -import { Card, Row, Col, Form, Input, Select, Icon, Button, Dropdown, Menu, InputNumber, DatePicker, Modal, message } from 'antd'; +import { Card, Form, Input, Select, Icon, Button, Dropdown, Menu, InputNumber, DatePicker, Modal, message } from 'antd'; import StandardTable from '../../components/StandardTable'; import PageHeaderLayout from '../../layouts/PageHeaderLayout'; @@ -156,11 +156,6 @@ export default class TableList extends PureComponent { const { rule: { loading: ruleLoading, data }, form: { getFieldDecorator } } = this.props; const { selectedRows, modalVisible, addInputValue } = this.state; - const formItemLayout = { - labelCol: { xs: 5, sm: 8, lg: 6, xl: 6 }, - wrapperCol: { xs: 18, sm: 16, lg: 17, xl: 17 }, - }; - const menu = ( 删除 @@ -173,56 +168,47 @@ export default class TableList extends PureComponent {
-
- - - - {getFieldDecorator('no')( - - )} - - - - - {getFieldDecorator('status')( - - )} - - - - - - + +
+ + {getFieldDecorator('no')( + + )} + + + {getFieldDecorator('status')( + + )} + + + + + + {this.state.expandForm ? '收起' : '展开'} + + +
{ this.state.expandForm && ( - - - - {getFieldDecorator('updatedAt')( - - )} - - - - - {getFieldDecorator('callNo')( - } - placeholder="请输入" - /> - )} - - - +
+ + {getFieldDecorator('updatedAt')( + + )} + + + {getFieldDecorator('callNo')( + } + placeholder="请输入" + style={{ width: 272 }} + /> + )} + +
) }
diff --git a/src/routes/List/TableList.less b/src/routes/List/TableList.less index 21e1d93c..904668d1 100644 --- a/src/routes/List/TableList.less +++ b/src/routes/List/TableList.less @@ -3,11 +3,6 @@ .tableList { padding-bottom: 8px; - :global { - .ant-form-item { - margin-bottom: 24px; - } - } .tableListOperator { margin-bottom: 16px; button { @@ -16,20 +11,23 @@ } } +.tableListForm :global(.ant-form-item) { + margin-right: 48px; + margin-bottom: 8px; +} + .formButton { - margin-left: 40px; - position: relative; - top: 2px; + white-space: nowrap; } @media screen and (max-width: @screen-lg) { - .formButton { - margin-left: 20px; + .tableListForm :global(.ant-form-item) { + margin-right: 24px; } } @media screen and (max-width: @screen-md) { - .formButton { - margin-left: 0; + .tableListForm :global(.ant-form-item) { + margin-right: 8px; } } -- GitLab