Commit 70681d8e authored by xiaohuoni's avatar xiaohuoni

code style

parent bd910cab
......@@ -173,10 +173,7 @@ class BaseView extends Component {
})(<PhoneView />)}
</FormItem>
<Button type="primary">
<FormattedMessage
id="BLOCK_NAME.basic.update"
defaultMessage="Update Information"
/>
<FormattedMessage id="BLOCK_NAME.basic.update" defaultMessage="Update Information" />
</Button>
</Form>
</div>
......
......@@ -46,7 +46,8 @@ export default {
'BLOCK_NAME.client.placeholder':
'Please describe your customer service, internal customers directly @ Name / job number',
'BLOCK_NAME.invites.label': 'Inviting critics',
'BLOCK_NAME.invites.placeholder': 'Please direct @ Name / job number, you can invite up to 5 people',
'BLOCK_NAME.invites.placeholder':
'Please direct @ Name / job number, you can invite up to 5 people',
'BLOCK_NAME.weight.label': 'Weight',
'BLOCK_NAME.weight.placeholder': 'Please enter weight',
'BLOCK_NAME.public.label': 'Target disclosure',
......
......@@ -42,7 +42,8 @@ export default {
'BLOCK_NAME.client.placeholder':
'Please describe your customer service, internal customers directly @ Name / job number',
'BLOCK_NAME.invites.label': 'Inviting critics',
'BLOCK_NAME.invites.placeholder': 'Please direct @ Name / job number, you can invite up to 5 people',
'BLOCK_NAME.invites.placeholder':
'Please direct @ Name / job number, you can invite up to 5 people',
'BLOCK_NAME.weight.label': 'Weight',
'BLOCK_NAME.weight.placeholder': 'Please enter weight',
'BLOCK_NAME.public.label': 'Target disclosure',
......
......@@ -22,10 +22,14 @@ const IntroduceRow = memo(({ loading, visitData }) => (
<Col {...topColResponsiveProps}>
<ChartCard
bordered={false}
title={<FormattedMessage id="BLOCK_NAME.analysis.total-sales" defaultMessage="Total Sales" />}
title={
<FormattedMessage id="BLOCK_NAME.analysis.total-sales" defaultMessage="Total Sales" />
}
action={
<Tooltip
title={<FormattedMessage id="BLOCK_NAME.analysis.introduce" defaultMessage="Introduce" />}
title={
<FormattedMessage id="BLOCK_NAME.analysis.introduce" defaultMessage="Introduce" />
}
>
<Icon type="info-circle-o" />
</Tooltip>
......@@ -34,7 +38,9 @@ const IntroduceRow = memo(({ loading, visitData }) => (
total={() => <Yuan>126560</Yuan>}
footer={
<Field
label={<FormattedMessage id="BLOCK_NAME.analysis.day-sales" defaultMessage="Daily Sales" />}
label={
<FormattedMessage id="BLOCK_NAME.analysis.day-sales" defaultMessage="Daily Sales" />
}
value={`¥${numeral(12423).format('0,0')}`}
/>
}
......@@ -58,7 +64,9 @@ const IntroduceRow = memo(({ loading, visitData }) => (
title={<FormattedMessage id="BLOCK_NAME.analysis.visits" defaultMessage="Visits" />}
action={
<Tooltip
title={<FormattedMessage id="BLOCK_NAME.analysis.introduce" defaultMessage="Introduce" />}
title={
<FormattedMessage id="BLOCK_NAME.analysis.introduce" defaultMessage="Introduce" />
}
>
<Icon type="info-circle-o" />
</Tooltip>
......@@ -66,7 +74,9 @@ const IntroduceRow = memo(({ loading, visitData }) => (
total={numeral(8846).format('0,0')}
footer={
<Field
label={<FormattedMessage id="BLOCK_NAME.analysis.day-visits" defaultMessage="Daily Visits" />}
label={
<FormattedMessage id="BLOCK_NAME.analysis.day-visits" defaultMessage="Daily Visits" />
}
value={numeral(1234).format('0,0')}
/>
}
......@@ -82,7 +92,9 @@ const IntroduceRow = memo(({ loading, visitData }) => (
title={<FormattedMessage id="BLOCK_NAME.analysis.payments" defaultMessage="Payments" />}
action={
<Tooltip
title={<FormattedMessage id="BLOCK_NAME.analysis.introduce" defaultMessage="Introduce" />}
title={
<FormattedMessage id="BLOCK_NAME.analysis.introduce" defaultMessage="Introduce" />
}
>
<Icon type="info-circle-o" />
</Tooltip>
......@@ -116,7 +128,9 @@ const IntroduceRow = memo(({ loading, visitData }) => (
}
action={
<Tooltip
title={<FormattedMessage id="BLOCK_NAME.analysis.introduce" defaultMessage="Introduce" />}
title={
<FormattedMessage id="BLOCK_NAME.analysis.introduce" defaultMessage="Introduce" />
}
>
<Icon type="info-circle-o" />
</Tooltip>
......
......@@ -12,7 +12,10 @@ const CustomTab = ({ data, currentTabKey: currentKey }) => (
<NumberInfo
title={data.name}
subTitle={
<FormattedMessage id="BLOCK_NAME.analysis.conversion-rate" defaultMessage="Conversion Rate" />
<FormattedMessage
id="BLOCK_NAME.analysis.conversion-rate"
defaultMessage="Conversion Rate"
/>
}
gap={2}
total={`${data.cvr * 100}%`}
......
......@@ -47,7 +47,10 @@ const TopSearch = memo(({ loading, visitData2, searchData, dropdownGroup }) => (
loading={loading}
bordered={false}
title={
<FormattedMessage id="BLOCK_NAME.analysis.online-top-search" defaultMessage="Online Top Search" />
<FormattedMessage
id="BLOCK_NAME.analysis.online-top-search"
defaultMessage="Online Top Search"
/>
}
extra={dropdownGroup}
style={{ marginTop: 24 }}
......@@ -57,9 +60,14 @@ const TopSearch = memo(({ loading, visitData2, searchData, dropdownGroup }) => (
<NumberInfo
subTitle={
<span>
<FormattedMessage id="BLOCK_NAME.analysis.search-users" defaultMessage="search users" />
<FormattedMessage
id="BLOCK_NAME.analysis.search-users"
defaultMessage="search users"
/>
<Tooltip
title={<FormattedMessage id="BLOCK_NAME.analysis.introduce" defaultMessage="introduce" />}
title={
<FormattedMessage id="BLOCK_NAME.analysis.introduce" defaultMessage="introduce" />
}
>
<Icon style={{ marginLeft: 8 }} type="info-circle-o" />
</Tooltip>
......@@ -81,7 +89,9 @@ const TopSearch = memo(({ loading, visitData2, searchData, dropdownGroup }) => (
defaultMessage="Per Capita Search"
/>
<Tooltip
title={<FormattedMessage id="BLOCK_NAME.analysis.introduce" defaultMessage="introduce" />}
title={
<FormattedMessage id="BLOCK_NAME.analysis.introduce" defaultMessage="introduce" />
}
>
<Icon style={{ marginLeft: 8 }} type="info-circle-o" />
</Tooltip>
......
......@@ -115,7 +115,10 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
/>
)}
</FormItem>
<FormItem {...formItemLayout} label={<FormattedMessage id="BLOCK_NAME.standard.label" />}>
<FormItem
{...formItemLayout}
label={<FormattedMessage id="BLOCK_NAME.standard.label" />}
>
{getFieldDecorator('standard', {
rules: [
{
......
......@@ -46,7 +46,8 @@ export default {
'BLOCK_NAME.client.placeholder':
'Please describe your customer service, internal customers directly @ Name / job number',
'BLOCK_NAME.invites.label': 'Inviting critics',
'BLOCK_NAME.invites.placeholder': 'Please direct @ Name / job number, you can invite up to 5 people',
'BLOCK_NAME.invites.placeholder':
'Please direct @ Name / job number, you can invite up to 5 people',
'BLOCK_NAME.weight.label': 'Weight',
'BLOCK_NAME.weight.placeholder': 'Please enter weight',
'BLOCK_NAME.public.label': 'Target disclosure',
......
......@@ -42,7 +42,8 @@ export default {
'BLOCK_NAME.client.placeholder':
'Please describe your customer service, internal customers directly @ Name / job number',
'BLOCK_NAME.invites.label': 'Inviting critics',
'BLOCK_NAME.invites.placeholder': 'Please direct @ Name / job number, you can invite up to 5 people',
'BLOCK_NAME.invites.placeholder':
'Please direct @ Name / job number, you can invite up to 5 people',
'BLOCK_NAME.weight.label': 'Weight',
'BLOCK_NAME.weight.placeholder': 'Please enter weight',
'BLOCK_NAME.public.label': 'Target disclosure',
......
import React from 'react';
import { formatMessage } from 'umi-plugin-react/locale';
import Link from 'umi/link';
......@@ -7,7 +6,7 @@ import Exception from './components/Exception';
const PAGE_NAME_UPPER_CAMEL_CASE: React.FC = () => (
<Exception
type="403"
desc={formatMessage({ id:'BLOCK_NAME.description.403' })}
desc={formatMessage({ id: 'BLOCK_NAME.description.403' })}
linkElement={Link}
backText={formatMessage({ id: 'BLOCK_NAME.exception.back' })}
/>
......
......@@ -22,11 +22,5 @@
}
},
"include": ["."],
"exclude": [
"node_modules",
"_scripts",
"jest",
"tslint:latest",
"tslint-config-prettier"
]
"exclude": ["node_modules", "_scripts", "jest", "tslint:latest", "tslint-config-prettier"]
}
......@@ -22,11 +22,5 @@
}
},
"include": ["."],
"exclude": [
"node_modules",
"_scripts",
"jest",
"tslint:latest",
"tslint-config-prettier"
]
"exclude": ["node_modules", "_scripts", "jest", "tslint:latest", "tslint-config-prettier"]
}
......@@ -121,7 +121,9 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
<ActiveChart />
</Card>
<Card
title={<FormattedMessage id="BLOCK_NAME.monitor.efficiency" defaultMessage="Efficiency" />}
title={
<FormattedMessage id="BLOCK_NAME.monitor.efficiency" defaultMessage="Efficiency" />
}
style={{ marginBottom: 24 }}
bodyStyle={{ textAlign: 'center' }}
bordered={false}
......@@ -152,7 +154,10 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
animate={false}
percent={28}
subTitle={
<FormattedMessage id="BLOCK_NAME.monitor.fast-food" defaultMessage="Fast food" />
<FormattedMessage
id="BLOCK_NAME.monitor.fast-food"
defaultMessage="Fast food"
/>
}
total="28%"
height={128}
......@@ -220,7 +225,10 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
<WaterWave
height={161}
title={
<FormattedMessage id="BLOCK_NAME.monitor.fund-surplus" defaultMessage="Fund Surplus" />
<FormattedMessage
id="BLOCK_NAME.monitor.fund-surplus"
defaultMessage="Fund Surplus"
/>
}
percent={34}
/>
......
import React, { PureComponent } from 'react';
import numeral from 'numeral';
import { connect } from 'dva';
import { Row, Col, Form, Card, Select, Icon, Avatar, List, Tooltip, Dropdown, Menu, Input } from 'antd';
import {
Row,
Col,
Form,
Card,
Select,
Icon,
Avatar,
List,
Tooltip,
Dropdown,
Menu,
Input,
} from 'antd';
import { TagSelect } from 'ant-design-pro';
import StandardFormRow from './components/StandardFormRow';
......@@ -102,11 +115,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
);
return (
<PageHeaderWrapper
title="搜索列表"
content={mainSearch}
onTabChange={this.handleTabChange}
>
<PageHeaderWrapper title="搜索列表" content={mainSearch} onTabChange={this.handleTabChange}>
<div className={styles.filterCardList}>
<Card bordered={false}>
<Form layout="inline">
......@@ -181,7 +190,10 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
</Dropdown>,
]}
>
<Card.Meta avatar={<Avatar size="small" src={item.avatar} />} title={item.title} />
<Card.Meta
avatar={<Avatar size="small" src={item.avatar} />}
title={item.title}
/>
<div className={styles.cardItemContent}>
<CardInfo
activeUser={formatWan(item.activeUser)}
......
......@@ -133,11 +133,7 @@ class SearchList extends Component {
);
return (
<PageHeaderWrapper
title="搜索列表"
content={mainSearch}
onTabChange={this.handleTabChange}
>
<PageHeaderWrapper title="搜索列表" content={mainSearch} onTabChange={this.handleTabChange}>
<Card bordered={false}>
<Form layout="inline">
<StandardFormRow title="所属类目" block style={{ paddingBottom: 11 }}>
......
......@@ -107,11 +107,7 @@ class CoverCardList extends PureComponent {
);
return (
<PageHeaderWrapper
title="搜索列表"
content={mainSearch}
onTabChange={this.handleTabChange}
>
<PageHeaderWrapper title="搜索列表" content={mainSearch} onTabChange={this.handleTabChange}>
<div className={styles.coverCardList}>
<Card bordered={false}>
<Form layout="inline">
......
......@@ -46,7 +46,8 @@ export default {
'BLOCK_NAME.client.placeholder':
'Please describe your customer service, internal customers directly @ Name / job number',
'BLOCK_NAME.invites.label': 'Inviting critics',
'BLOCK_NAME.invites.placeholder': 'Please direct @ Name / job number, you can invite up to 5 people',
'BLOCK_NAME.invites.placeholder':
'Please direct @ Name / job number, you can invite up to 5 people',
'BLOCK_NAME.weight.label': 'Weight',
'BLOCK_NAME.weight.placeholder': 'Please enter weight',
'BLOCK_NAME.public.label': 'Target disclosure',
......
......@@ -42,7 +42,8 @@ export default {
'BLOCK_NAME.client.placeholder':
'Please describe your customer service, internal customers directly @ Name / job number',
'BLOCK_NAME.invites.label': 'Inviting critics',
'BLOCK_NAME.invites.placeholder': 'Please direct @ Name / job number, you can invite up to 5 people',
'BLOCK_NAME.invites.placeholder':
'Please direct @ Name / job number, you can invite up to 5 people',
'BLOCK_NAME.weight.label': 'Weight',
'BLOCK_NAME.weight.placeholder': 'Please enter weight',
'BLOCK_NAME.public.label': 'Target disclosure',
......
......@@ -81,7 +81,9 @@ class LoginPage extends Component {
{status === 'error' &&
loginType === 'account' &&
!submitting &&
this.renderMessage(formatMessage({ id: 'BLOCK_NAME.login.message-invalid-credentials' }))}
this.renderMessage(
formatMessage({ id: 'BLOCK_NAME.login.message-invalid-credentials' })
)}
<UserName
name="userName"
placeholder={`${formatMessage({ id: 'BLOCK_NAME.login.userName' })}: admin or user`}
......
export default {
'BLOCK_NAME.login.userName': 'userName',
'BLOCK_NAME.login.password': 'password',
'BLOCK_NAME.login.message-invalid-credentials': 'Invalid username or password(admin/ant.design)',
'BLOCK_NAME.login.message-invalid-credentials':
'Invalid username or password(admin/ant.design)',
'BLOCK_NAME.login.message-invalid-verification-code': 'Invalid verification code',
'BLOCK_NAME.login.tab-login-credentials': 'Credentials',
'BLOCK_NAME.login.tab-login-mobile': 'Mobile number',
......@@ -60,7 +61,8 @@ export default {
'BLOCK_NAME.client.placeholder':
'Please describe your customer service, internal customers directly @ Name / job number',
'BLOCK_NAME.invites.label': 'Inviting critics',
'BLOCK_NAME.invites.placeholder': 'Please direct @ Name / job number, you can invite up to 5 people',
'BLOCK_NAME.invites.placeholder':
'Please direct @ Name / job number, you can invite up to 5 people',
'BLOCK_NAME.weight.label': 'Weight',
'BLOCK_NAME.weight.placeholder': 'Please enter weight',
'BLOCK_NAME.public.label': 'Target disclosure',
......
import { parse } from 'query-string'
import { parse } from 'query-string';
export function getPageQuery() {
return parse(window.location.href.split('?')[1]);
......
......@@ -196,7 +196,10 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component {
},
],
})(
<Input size="large" placeholder={formatMessage({ id: 'BLOCK_NAME.email.placeholder' })} />
<Input
size="large"
placeholder={formatMessage({ id: 'BLOCK_NAME.email.placeholder' })}
/>
)}
</FormItem>
<FormItem help={help}>
......
export default {
'BLOCK_NAME.login.userName': 'userName',
'BLOCK_NAME.login.password': 'password',
'BLOCK_NAME.login.message-invalid-credentials': 'Invalid username or password(admin/ant.design)',
'BLOCK_NAME.login.message-invalid-credentials':
'Invalid username or password(admin/ant.design)',
'BLOCK_NAME.login.message-invalid-verification-code': 'Invalid verification code',
'BLOCK_NAME.login.tab-login-credentials': 'Credentials',
'BLOCK_NAME.login.tab-login-mobile': 'Mobile number',
......@@ -60,7 +61,8 @@ export default {
'BLOCK_NAME.client.placeholder':
'Please describe your customer service, internal customers directly @ Name / job number',
'BLOCK_NAME.invites.label': 'Inviting critics',
'BLOCK_NAME.invites.placeholder': 'Please direct @ Name / job number, you can invite up to 5 people',
'BLOCK_NAME.invites.placeholder':
'Please direct @ Name / job number, you can invite up to 5 people',
'BLOCK_NAME.weight.label': 'Weight',
'BLOCK_NAME.weight.placeholder': 'Please enter weight',
'BLOCK_NAME.public.label': 'Target disclosure',
......
export default {
'BLOCK_NAME.login.userName': 'userName',
'BLOCK_NAME.login.password': 'password',
'BLOCK_NAME.login.message-invalid-credentials': 'Invalid username or password(admin/ant.design)',
'BLOCK_NAME.login.message-invalid-credentials':
'Invalid username or password(admin/ant.design)',
'BLOCK_NAME.login.message-invalid-verification-code': 'Invalid verification code',
'BLOCK_NAME.login.tab-login-credentials': 'Credentials',
'BLOCK_NAME.login.tab-login-mobile': 'Mobile number',
......
......@@ -15,14 +15,15 @@ const prettierConfigPath = require.resolve('../.prettierrc');
let didError = false;
let files = [];
const jsFiles = glob.sync('ant-design-pro/**/*.js*', {
ignore: ['**/node_modules/**', 'build/**'],
const jsFiles = glob.sync('**/src/*.js*', {
ignore: ['**/node_modules/**', 'build/**', '**/.umi/**'],
});
const tsFiles = glob.sync('ant-design-pro/**/*.ts*', {
ignore: ['**/node_modules/**', 'build/**'],
const tsFiles = glob.sync('**/src/*.ts*', {
ignore: ['**/node_modules/**', 'build/**', '**/.umi/**'],
});
files = files.concat(jsFiles);
files = files.concat(tsFiles);
if (!files.length) {
return;
}
......
......@@ -7,7 +7,7 @@
"lint:fix": "eslint --fix --ext .js src mock tests && npm run lint:style",
"lint-staged": "lint-staged",
"lint-staged:js": "eslint --ext .js",
"prettier": "node ./_scripts/prettier.jsy"
"prettier": "node ./_scripts/prettier.js"
},
"devDependencies": {
"@types/classnames": "^2.2.7",
......
......@@ -22,11 +22,5 @@
}
},
"include": ["."],
"exclude": [
"node_modules",
"_scripts",
"jest",
"tslint:latest",
"tslint-config-prettier"
]
"exclude": ["node_modules", "_scripts", "jest", "tslint:latest", "tslint-config-prettier"]
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment