Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@
"Views": "Views",
"Visibility": "Visibility",
"You have viewed all notifications.": "You have viewed all notifications."
}
}
21 changes: 12 additions & 9 deletions src/pages/user/components/Filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React, { Component } from 'react'
import PropTypes from 'prop-types'
import dayjs from 'dayjs'
import { FilterItem } from 'components'
import { Trans } from "@lingui/macro"
import { t } from "@lingui/macro"
import { Trans } from '@lingui/macro'
import { t } from '@lingui/macro'
import { Button, Row, Col, DatePicker, Form, Input, Cascader } from 'antd'
import city from 'utils/city'

Expand All @@ -26,7 +26,7 @@ const TwoColProps = {
class Filter extends Component {
formRef = React.createRef()

handleFields = fields => {
handleFields = (fields) => {
const { createTime } = fields
if (createTime && createTime.length) {
fields.createTime = [
Expand Down Expand Up @@ -79,7 +79,11 @@ class Filter extends Component {
}

return (
<Form ref={this.formRef} name="control-ref" initialValues={{ name, address, createTime: initialCreateTime }}>
<Form
ref={this.formRef}
name="control-ref"
initialValues={{ name, address, createTime: initialCreateTime }}
>
<Row gutter={24}>
<Col {...ColProps} xl={{ span: 4 }} md={{ span: 8 }}>
<Form.Item name="name">
Expand All @@ -93,7 +97,7 @@ class Filter extends Component {
{...ColProps}
xl={{ span: 4 }}
md={{ span: 8 }}
id="addressCascader"
id="address_Cascade"
>
<Form.Item name="address">
<Cascader
Expand All @@ -112,9 +116,7 @@ class Filter extends Component {
>
<FilterItem label={t`CreateTime`}>
<Form.Item name="createTime">
<RangePicker
style={{ width: '100%' }}
/>
<RangePicker style={{ width: '100%' }} />
</Form.Item>
</FilterItem>
</Col>
Expand All @@ -127,7 +129,8 @@ class Filter extends Component {
<Row type="flex" align="middle" justify="space-between">
<div>
<Button
type="primary" htmlType="submit"
type="primary"
htmlType="submit"
className="margin-right"
onClick={this.handleSubmit}
>
Expand Down