Commit d7b87c27 authored by 陈帅's avatar 陈帅

fix some eslint error

parent 484d71d8
......@@ -19,6 +19,7 @@ module.exports = {
'react/jsx-no-bind': [0],
'react/prop-types': [0],
'react/prefer-stateless-function': [0],
'react/jsx-one-expression-per-line': [0],
'react/jsx-wrap-multilines': [
'error',
{
......
......@@ -5,13 +5,16 @@ export default class PromiseRender extends React.PureComponent {
state = {
component: null,
};
componentDidMount() {
this.setRenderComponent(this.props);
}
componentWillReceiveProps(nextProps) {
// new Props enter
this.setRenderComponent(nextProps);
}
// set render Component : ok or error
setRenderComponent(props) {
const ok = this.checkIsInstantiation(props.ok);
......@@ -28,6 +31,7 @@ export default class PromiseRender extends React.PureComponent {
});
});
}
// Determine whether the incoming component has been instantiated
// AuthorizedRoute is already instantiated
// Authorized render is already instantiated, children is no instantiated
......@@ -38,6 +42,7 @@ export default class PromiseRender extends React.PureComponent {
}
return () => target;
};
render() {
const Component = this.state.component;
return Component ? (
......
......@@ -44,8 +44,7 @@ export default class TimelineChart extends React.Component {
});
const dv = ds.createView();
dv
.source(data)
dv.source(data)
.transform({
type: 'filter',
callback: obj => {
......
......@@ -189,7 +189,10 @@ export default class WaterWave extends PureComponent {
</div>
<div className={styles.text} style={{ width: height }}>
{title && <span>{title}</span>}
<h4>{percent}%</h4>
<h4>
{percent}
%
</h4>
</div>
</div>
);
......
......@@ -39,7 +39,9 @@ class CountDown extends Component {
}
timer = 0;
interval = 1000;
initTime = props => {
let lastTime = 0;
let targetTime = 0;
......@@ -58,6 +60,7 @@ class CountDown extends Component {
lastTime: lastTime < 0 ? 0 : lastTime,
};
};
// defaultFormat = time => (
// <span>{moment(time).format('hh:mm:ss')}</span>
// );
......@@ -70,10 +73,15 @@ class CountDown extends Component {
const s = Math.floor((time - h * hours - m * minutes) / 1000);
return (
<span>
{fixedZero(h)}:{fixedZero(m)}:{fixedZero(s)}
{fixedZero(h)}
:
{fixedZero(m)}
:
{fixedZero(s)}
</span>
);
};
tick = () => {
const { onEnd } = this.props;
let { lastTime } = this.state;
......
......@@ -10,8 +10,8 @@ const Description = ({ term, column, className, children, ...restProps }) => {
return (
<Col className={clsString} {...responsive[column]} {...restProps}>
{term && <div className={styles.term}>{term}</div>}
{children !== null && children !== undefined &&
<div className={styles.detail}>{children}</div>}
{children !== null &&
children !== undefined && <div className={styles.detail}>{children}</div>}
</Col>
);
};
......
......@@ -22,7 +22,10 @@ const DescriptionList = ({
<div className={clsString} {...restProps}>
{title ? <div className={styles.title}>{title}</div> : null}
<Row gutter={gutter}>
{React.Children.map(children, child => child ? React.cloneElement(child, { column }) : child)}
{React.Children.map(
children,
child => (child ? React.cloneElement(child, { column }) : child)
)}
</Row>
</div>
);
......
......@@ -7,19 +7,23 @@ export default class EditableItem extends PureComponent {
value: this.props.value,
editable: false,
};
handleChange = e => {
const { value } = e.target;
this.setState({ value });
};
check = () => {
this.setState({ editable: false });
if (this.props.onChange) {
this.props.onChange(this.state.value);
}
};
edit = () => {
this.setState({ editable: true });
};
render() {
const { value, editable } = this.state;
return (
......
......@@ -17,6 +17,7 @@ class EditableLinkGroup extends PureComponent {
onAdd: () => {},
linkElement: 'a',
};
render() {
const { links, linkElement, onAdd } = this.props;
return (
......
......@@ -12,8 +12,9 @@ export default class GlobalHeader extends PureComponent {
componentWillUnmount() {
this.triggerResizeEvent.cancel();
}
getNoticeData() {
const { notices} = this.props;
const { notices } = this.props;
if (notices == null || notices.length === 0) {
return {};
}
......@@ -43,6 +44,7 @@ export default class GlobalHeader extends PureComponent {
});
return groupBy(newNotices, 'type');
}
toggle = () => {
const { collapsed, onCollapse } = this.props;
onCollapse(!collapsed);
......@@ -67,7 +69,7 @@ export default class GlobalHeader extends PureComponent {
onNoticeClear,
} = this.props;
if (currentUser == null) {
currentUser = {}
currentUser = {};
}
const menu = (
<Menu className={styles.menu} selectedKeys={[]} onClick={onMenuClick}>
......
......@@ -31,17 +31,20 @@ export default class HeaderSearch extends PureComponent {
searchMode: this.props.defaultOpen,
value: '',
};
onKeyDown = e => {
if (e.key === 'Enter') {
this.debouncePressEnter();
}
};
onChange = value => {
this.setState({ value });
if (this.props.onChange) {
this.props.onChange();
}
};
// NOTE: 不能小于500,如果长按某键,第一次触发auto repeat的间隔是500ms,小于500会导致触发2次
@Bind()
@Debounce(500, {
......@@ -51,6 +54,7 @@ export default class HeaderSearch extends PureComponent {
debouncePressEnter() {
this.props.onPressEnter(this.state.value);
}
enterSearchMode = () => {
this.setState({ searchMode: true }, () => {
if (this.state.searchMode) {
......@@ -58,12 +62,14 @@ export default class HeaderSearch extends PureComponent {
}
});
};
leaveSearchMode = () => {
this.setState({
searchMode: false,
value: '',
});
};
render() {
const { className, placeholder, ...restProps } = this.props;
delete restProps.defaultOpen; // for rc-select not affected
......
......@@ -14,20 +14,24 @@ function generator({ defaultProps, defaultRules, type }) {
form: PropTypes.object,
updateActive: PropTypes.func,
};
constructor(props) {
super(props);
this.state = {
count: 0,
};
}
componentDidMount() {
if (this.context.updateActive) {
this.context.updateActive(this.props.name);
}
}
componentWillUnmount() {
clearInterval(this.interval);
}
onGetCaptcha = () => {
let count = 59;
this.setState({ count });
......@@ -42,6 +46,7 @@ function generator({ defaultProps, defaultRules, type }) {
}
}, 1000);
};
render() {
const { getFieldDecorator } = this.context.form;
const options = {};
......
......@@ -14,18 +14,22 @@ const generateId = (() => {
export default class LoginTab extends Component {
static __ANT_PRO_LOGIN_TAB = true;
static contextTypes = {
tabUtil: PropTypes.object,
};
constructor(props) {
super(props);
this.uniqueId = generateId('login-tab-');
}
componentWillMount() {
if (this.context.tabUtil) {
this.context.tabUtil.addTab(this.uniqueId);
}
}
render() {
return <TabPane {...this.props} />;
}
......
......@@ -33,6 +33,7 @@ class Login extends Component {
tabs: [],
active: {},
};
getChildContext() {
return {
tabUtil: {
......@@ -61,12 +62,14 @@ class Login extends Component {
},
};
}
onSwitch = type => {
this.setState({
type,
});
this.props.onTabChange(type);
};
handleSubmit = e => {
e.preventDefault();
const { active, type } = this.state;
......@@ -75,6 +78,7 @@ class Login extends Component {
this.props.onSubmit(err, values);
});
};
render() {
const { className, children } = this.props;
const { type, tabs } = this.state;
......
......@@ -21,6 +21,7 @@ export default class NoticeIcon extends PureComponent {
},
emptyImage: 'https://gw.alipayobjects.com/zos/rmsportal/wAhyIChODzsoKIOBHcBk.svg',
};
constructor(props) {
super(props);
this.state = {};
......@@ -28,14 +29,17 @@ export default class NoticeIcon extends PureComponent {
this.state.tabType = props.children[0].props.title;
}
}
onItemClick = (item, tabProps) => {
const { onItemClick } = this.props;
onItemClick(item, tabProps);
};
onTabChange = tabType => {
this.setState({ tabType });
this.props.onTabChange(tabType);
};
getNotificationBox() {
const { children, loading, locale } = this.props;
if (!children) {
......@@ -67,6 +71,7 @@ export default class NoticeIcon extends PureComponent {
</Spin>
);
}
render() {
const { className, count, popupAlign, onPopupVisibleChange } = this.props;
const noticeButtonClass = classNames(className, styles.noticeButton);
......
......@@ -40,11 +40,13 @@ export default class PageHeader extends PureComponent {
this.getBreadcrumbDom();
}
}
onChange = key => {
if (this.props.onTabChange) {
this.props.onTabChange(key);
}
};
getBreadcrumbProps = () => {
return {
routes: this.props.routes || this.context.routes,
......@@ -53,12 +55,14 @@ export default class PageHeader extends PureComponent {
breadcrumbNameMap: this.props.breadcrumbNameMap || this.context.breadcrumbNameMap,
};
};
getBreadcrumbDom = () => {
const breadcrumb = this.conversionBreadcrumbList();
this.setState({
breadcrumb,
});
};
// Generated according to props
conversionFromProps = () => {
const { breadcrumbList, breadcrumbSeparator, linkElement = 'a' } = this.props;
......@@ -80,6 +84,7 @@ export default class PageHeader extends PureComponent {
</Breadcrumb>
);
};
conversionFromLocation = (routerLocation, breadcrumbNameMap) => {
const { breadcrumbSeparator, linkElement = 'a' } = this.props;
// Convert the url to an array
......@@ -116,6 +121,7 @@ export default class PageHeader extends PureComponent {
</Breadcrumb>
);
};
/**
* 将参数转化为面包屑
* Convert parameters into breadcrumbs
......@@ -146,6 +152,7 @@ export default class PageHeader extends PureComponent {
}
return null;
};
// 渲染Breadcrumb 子节点
// Render the Breadcrumb child node
itemRender = (route, params, routes, paths) => {
......
......@@ -28,8 +28,7 @@ const getIcon = icon => {
* @param menu
*/
export const getFlatMenuKeys = menu =>
menu
.reduce((keys, item) => {
menu.reduce((keys, item) => {
keys.push(item.path);
if (item.children) {
return keys.concat(getFlatMenuKeys(item.children));
......@@ -43,11 +42,11 @@ export const getFlatMenuKeys = menu =>
* @param paths: [/abc, /abc/11, /abc/11/info]
*/
export const getMenuMatchKeys = (flatMenuKeys, paths) =>
paths
.reduce((matchKeys, path) => (
matchKeys.concat(
flatMenuKeys.filter(item => pathToRegexp(item).test(path))
)), []);
paths.reduce(
(matchKeys, path) =>
matchKeys.concat(flatMenuKeys.filter(item => pathToRegexp(item).test(path))),
[]
);
export default class SiderMenu extends PureComponent {
constructor(props) {
......@@ -58,6 +57,7 @@ export default class SiderMenu extends PureComponent {
openKeys: this.getDefaultCollapsedSubMenus(props),
};
}
componentWillReceiveProps(nextProps) {
if (nextProps.location.pathname !== this.props.location.pathname) {
this.setState({
......@@ -65,15 +65,20 @@ export default class SiderMenu extends PureComponent {
});
}
}
/**
* Convert pathname to openKeys
* /list/search/articles = > ['list','/list/search']
* @param props
*/
getDefaultCollapsedSubMenus(props) {
const { location: { pathname } } = props || this.props;
const {
location: { pathname },
} =
props || this.props;
return getMenuMatchKeys(this.flatMenuKeys, urlToList(pathname));
}
/**
* 判断是否是http链接.返回 Link 或 a
* Judge whether it is http link.return a or Link
......@@ -110,6 +115,7 @@ export default class SiderMenu extends PureComponent {
</Link>
);
};
/**
* get SubMenu or Item
*/
......@@ -141,6 +147,7 @@ export default class SiderMenu extends PureComponent {
return <Menu.Item key={item.path}>{this.getMenuItemPath(item)}</Menu.Item>;
}
};
/**
* 获得菜单子节点
* @memberof SiderMenu
......@@ -158,11 +165,15 @@ export default class SiderMenu extends PureComponent {
})
.filter(item => item);
};
// Get the currently selected menu
getSelectedMenuKeys = () => {
const { location: { pathname } } = this.props;
const {
location: { pathname },
} = this.props;
return getMenuMatchKeys(this.flatMenuKeys, urlToList(pathname));
};
// conversion Path
// 转化路径
conversionPath = path => {
......@@ -172,6 +183,7 @@ export default class SiderMenu extends PureComponent {
return `/${path || ''}`.replace(/\/+/g, '/');
}
};
// permission to check
checkPermissionItem = (authority, ItemDom) => {
if (this.props.Authorized && this.props.Authorized.check) {
......@@ -180,9 +192,11 @@ export default class SiderMenu extends PureComponent {
}
return ItemDom;
};
isMainMenu = key => {
return this.menus.some(item => key && (item.key === key || item.path === key));
};
handleOpenChange = openKeys => {
const lastOpenKey = openKeys[openKeys.length - 1];
const moreThanOne = openKeys.filter(openKey => this.isMainMenu(openKey)).length > 1;
......@@ -190,6 +204,7 @@ export default class SiderMenu extends PureComponent {
openKeys: moreThanOne ? [lastOpenKey] : [...openKeys],
});
};
render() {
const { logo, collapsed, onCollapse } = this.props;
const { openKeys } = this.state;
......
......@@ -63,7 +63,12 @@ class StandardTable extends PureComponent {
render() {
const { selectedRowKeys, needTotalList } = this.state;
const { data: { list, pagination }, loading, columns, rowKey } = this.props;
const {
data: { list, pagination },
loading,
columns,
rowKey,
} = this.props;
const paginationProps = {
showSizeChanger: true,
......@@ -88,7 +93,8 @@ class StandardTable extends PureComponent {
已选择 <a style={{ fontWeight: 600 }}>{selectedRowKeys.length}</a> 项&nbsp;&nbsp;
{needTotalList.map(item => (
<span style={{ marginLeft: 8 }} key={item.dataIndex}>
{item.title}总计&nbsp;
{item.title}
总计&nbsp;
<span style={{ fontWeight: 600 }}>
{item.render ? item.render(item.total) : item.total}
</span>
......
......@@ -19,6 +19,7 @@ class TagSelect extends Component {
expand: false,
value: this.props.value || this.props.defaultValue || [],
};
componentWillReceiveProps(nextProps) {
if ('value' in nextProps && nextProps.value) {
this.setState({ value: nextProps.value });
......
......@@ -89,9 +89,11 @@ class BasicLayout extends React.PureComponent {
location: PropTypes.object,
breadcrumbNameMap: PropTypes.object,
};
state = {
isMobile,
};
getChildContext() {
const { location, routerData } = this.props;
return {
......@@ -99,6 +101,7 @@ class BasicLayout extends React.PureComponent {
breadcrumbNameMap: getBreadcrumbNameMap(getMenuData(), routerData),
};
}
componentDidMount() {
this.enquireHandler = enquireScreen(mobile => {
this.setState({
......@@ -109,9 +112,11 @@ class BasicLayout extends React.PureComponent {
type: 'user/fetchCurrent',
});
}
componentWillUnmount() {
unenquireScreen(this.enquireHandler);
}
getPageTitle() {
const { routerData, location } = this.props;
const { pathname } = location;
......@@ -128,6 +133,7 @@ class BasicLayout extends React.PureComponent {
}
return title;
}
getBaseRedirect = () => {
// According to the url parameter to redirect
// 这里是重定向的,重定向到 url 的 redirect 参数所示地址
......@@ -148,12 +154,14 @@ class BasicLayout extends React.PureComponent {
}
return redirect;
};
handleMenuCollapse = collapsed => {
this.props.dispatch({
type: 'global/changeLayoutCollapsed',
payload: collapsed,
});
};
handleNoticeClear = type => {
message.success(`清空了${type}`);
this.props.dispatch({
......@@ -161,6 +169,7 @@ class BasicLayout extends React.PureComponent {
payload: type,
});
};
handleMenuClick = ({ key }) => {
if (key === 'triggerError') {
this.props.dispatch(routerRedux.push('/exception/trigger'));
......@@ -172,6 +181,7 @@ class BasicLayout extends React.PureComponent {
});
}
};
handleNoticeVisibleChange = visible => {
if (visible) {
this.props.dispatch({
......@@ -179,6 +189,7 @@ class BasicLayout extends React.PureComponent {
});
}
};
render() {
const {
currentUser,
......
......@@ -41,6 +41,7 @@ class UserLayout extends React.PureComponent {
}
return title;
}
render() {
const { routerData, match } = this.props;
return (
......
......@@ -43,7 +43,9 @@ for (let i = 0; i < 7; i += 1) {
}
const Yuan = ({ children }) => (
<span dangerouslySetInnerHTML={{ __html: yuan(children) }} /> /* eslint-disable-line react/no-danger */
<span
dangerouslySetInnerHTML={{ __html: yuan(children) }}
/> /* eslint-disable-line react/no-danger */
);
@connect(({ chart, loading }) => ({
......@@ -134,7 +136,9 @@ export default class Analysis extends Component {
const salesPieData =
salesType === 'all'
? salesTypeData
: salesType === 'online' ? salesTypeDataOnline : salesTypeDataOffline;
: salesType === 'online'
? salesTypeDataOnline
: salesTypeDataOffline;
const menu = (
<Menu>
......@@ -201,7 +205,10 @@ export default class Analysis extends Component {
sorter: (a, b) => a.range - b.range,
render: (text, record) => (
<Trend flag={record.status === 1 ? 'down' : 'up'}>
<span style={{ marginRight: 4 }}>{text}%</span>
<span style={{ marginRight: 4 }}>
{text}
%
</span>
</Trend>
),
align: 'right',
......@@ -261,10 +268,12 @@ export default class Analysis extends Component {
contentHeight={46}
>
<Trend flag="up" style={{ marginRight: 16 }}>
周同比<span className={styles.trendText}>12%</span>
周同比
<span className={styles.trendText}>12%</span>
</Trend>
<Trend flag="down">
日环比<span className={styles.trendText}>11%</span>
日环比
<span className={styles.trendText}>11%</span>
</Trend>
</ChartCard>
</Col>
......@@ -313,10 +322,12 @@ export default class Analysis extends Component {
footer={
<div style={{ whiteSpace: 'nowrap', overflow: 'hidden' }}>
<Trend flag="up" style={{ marginRight: 16 }}>
周同比<span className={styles.trendText}>12%</span>
周同比
<span className={styles.trendText}>12%</span>
</Trend>
<Trend flag="down">
日环比<span className={styles.trendText}>11%</span>
日环比
<span className={styles.trendText}>11%</span>
</Trend>
</div>
}
......@@ -455,9 +466,7 @@ export default class Analysis extends Component {
<Pie
hasLegend
subTitle="销售额"
total={
() => <Yuan>{salesPieData.reduce((pre, now) => now.y + pre, 0)}</Yuan>
}
total={() => <Yuan>{salesPieData.reduce((pre, now) => now.y + pre, 0)}</Yuan>}
data={salesPieData}
valueFormat={value => <Yuan>{value}</Yuan>}
height={248}
......
......@@ -99,7 +99,9 @@ export default class Workplace extends PureComponent {
}
renderActivities() {
const { activities: { list } } = this.props;
const {
activities: { list },
} = this.props;
return list.map(item => {
const events = item.template.split(/@\{([^{}]*)\}/gi).map(key => {
if (item[key]) {
......@@ -165,7 +167,8 @@ export default class Workplace extends PureComponent {
<div className={styles.statItem}>
<p>团队内排名</p>
<p>
8<span> / 24</span>
8
<span> / 24</span>
</p>
</div>
<div className={styles.statItem}>
......
......@@ -10,6 +10,7 @@ export default class TriggerException extends PureComponent {
state = {
isloading: false,
};
triggerError = code => {
this.setState({
isloading: true,
......@@ -21,6 +22,7 @@ export default class TriggerException extends PureComponent {
},
});
};
render() {
return (
<Card>
......
......@@ -61,12 +61,15 @@ class AdvancedForm extends PureComponent {
state = {
width: '100%',
};
componentDidMount() {
window.addEventListener('resize', this.resizeFooterToolbar);
}
componentWillUnmount() {
window.removeEventListener('resize', this.resizeFooterToolbar);
}
resizeFooterToolbar = () => {
const sider = document.querySelectorAll('.ant-layout-sider')[0];
const width = `calc(100% - ${sider.style.width})`;
......@@ -74,6 +77,7 @@ class AdvancedForm extends PureComponent {
this.setState({ width });
}
};
render() {
const { form, dispatch, submitting } = this.props;
const { getFieldDecorator, validateFieldsAndScroll, getFieldsError } = form;
......
......@@ -36,6 +36,7 @@ export default class BasicForms extends PureComponent {
}
});
};
render() {
const { submitting } = this.props;
const { getFieldDecorator, getFieldValue } = this.props.form;
......@@ -134,7 +135,8 @@ export default class BasicForms extends PureComponent {
{...formItemLayout}
label={
<span>
邀评人<em className={styles.optional}>选填</em>
邀评人
<em className={styles.optional}>选填</em>
</span>
}
>
......@@ -146,7 +148,8 @@ export default class BasicForms extends PureComponent {
{...formItemLayout}
label={
<span>
权重<em className={styles.optional}>选填</em>
权重
<em className={styles.optional}>选填</em>
</span>
}
>
......
......@@ -55,7 +55,11 @@ class Step2 extends React.PureComponent {
</Form.Item>
<Form.Item {...formItemLayout} className={styles.stepFormText} label="转账金额">
<span className={styles.money}>{data.amount}</span>
<span className={styles.uppercase}>{digitUppercase(data.amount)}</span>
<span className={styles.uppercase}>
{digitUppercase(data.amount)}
</span>
</Form.Item>
<Divider style={{ margin: '24px 0' }} />
<Form.Item {...formItemLayout} label="支付密码" required={false}>
......
......@@ -24,6 +24,7 @@ export default class StepForm extends PureComponent {
return 0;
}
}
render() {
const { match, routerData, location } = this.props;
return (
......
......@@ -11,6 +11,7 @@ export default class TableForm extends PureComponent {
loading: false,
};
}
componentWillReceiveProps(nextProps) {
if ('value' in nextProps) {
this.setState({
......@@ -18,11 +19,15 @@ export default class TableForm extends PureComponent {
});
}
}
getRowByKey(key, newData) {
return (newData || this.state.data).filter(item => item.key === key)[0];
}
index = 0;
cacheOriginData = {};
toggleEditable = (e, key) => {
e.preventDefault();
const newData = this.state.data.map(item => ({ ...item }));
......@@ -36,11 +41,13 @@ export default class TableForm extends PureComponent {
this.setState({ data: newData });
}
};
remove(key) {
const newData = this.state.data.filter(item => item.key !== key);
this.setState({ data: newData });
this.props.onChange(newData);
}
newMember = () => {
const newData = this.state.data.map(item => ({ ...item }));
newData.push({
......@@ -54,11 +61,13 @@ export default class TableForm extends PureComponent {
this.index += 1;
this.setState({ data: newData });
};
handleKeyPress(e, key) {
if (e.key === 'Enter') {
this.saveRow(e, key);
}
}
handleFieldChange(e, fieldName, key) {
const newData = this.state.data.map(item => ({ ...item }));
const target = this.getRowByKey(key, newData);
......@@ -67,6 +76,7 @@ export default class TableForm extends PureComponent {
this.setState({ data: newData });
}
}
saveRow(e, key) {
e.persist();
this.setState({
......@@ -94,6 +104,7 @@ export default class TableForm extends PureComponent {
});
}, 500);
}
cancel(e, key) {
this.clickedCancel = true;
e.preventDefault();
......@@ -107,6 +118,7 @@ export default class TableForm extends PureComponent {
this.setState({ data: newData });
this.clickedCancel = false;
}
render() {
const columns = [
{
......
......@@ -63,7 +63,11 @@ export default class FilterCardList extends PureComponent {
};
render() {
const { list: { list }, loading, form } = this.props;
const {
list: { list },
loading,
form,
} = this.props;
const { getFieldDecorator } = form;
const CardInfo = ({ activeUser, newUser }) => (
......
......@@ -39,7 +39,11 @@ export default class SearchList extends Component {
};
render() {
const { form, list: { list }, loading } = this.props;
const {
form,
list: { list },
loading,
} = this.props;
const { getFieldDecorator } = form;
const owners = [
......@@ -77,7 +81,8 @@ export default class SearchList extends Component {
<div className={styles.description}>{content}</div>
<div className={styles.extra}>
<Avatar src={avatar} size="small" />
<a href={href}>{owner}</a> 发布在 <a href={href}>{href}</a>
<a href={href}>{owner}</a> 发布
<a href={href}>{href}</a>
<em>{moment(updatedAt).format('YYYY-MM-DD HH:mm')}</em>
</div>
</div>
......
......@@ -39,7 +39,10 @@ export default class BasicList extends PureComponent {
}
render() {
const { list: { list }, loading } = this.props;
const {
list: { list },
loading,
} = this.props;
const Info = ({ title, value, bordered }) => (
<div className={styles.headerInfo}>
......
......@@ -22,7 +22,10 @@ export default class CardList extends PureComponent {
}
render() {
const { list: { list }, loading } = this.props;
const {
list: { list },
loading,
} = this.props;
const content = (
<div className={styles.pageHeaderContent}>
......
......@@ -48,7 +48,11 @@ export default class CoverCardList extends PureComponent {
};
render() {
const { list: { list = [] }, loading, form } = this.props;
const {
list: { list = [] },
loading,
form,
} = this.props;
const { getFieldDecorator } = form;
const cardList = list ? (
......
......@@ -312,7 +312,10 @@ export default class TableList extends PureComponent {
}
render() {
const { rule: { data }, loading } = this.props;
const {
rule: { data },
loading,
} = this.props;
const { selectedRows, modalVisible } = this.state;
const columns = [
......
......@@ -333,7 +333,8 @@ export default class AdvancedProfile extends Component {
</Card>
<Card title="用户近半年来电记录" style={{ marginBottom: 24 }} bordered={false}>
<div className={styles.noData}>
<Icon type="frown-o" />暂无数据
<Icon type="frown-o" />
暂无数据
</div>
</Card>
<Card
......
......@@ -16,13 +16,15 @@ const extra = (
您提交的内容有如下错误
</div>
<div style={{ marginBottom: 16 }}>
<Icon style={{ color: '#f5222d', marginRight: 8 }} type="close-circle-o" />您的账户已被冻结
<Icon style={{ color: '#f5222d', marginRight: 8 }} type="close-circle-o" />
您的账户已被冻结
<a style={{ marginLeft: 16 }}>
立即解冻 <Icon type="right" />
</a>
</div>
<div>
<Icon style={{ color: '#f5222d', marginRight: 8 }} type="close-circle-o" />您的账户还不具备申请资格
<Icon style={{ color: '#f5222d', marginRight: 8 }} type="close-circle-o" />
您的账户还不具备申请资格
<a style={{ marginLeft: 16 }}>
立即升级 <Icon type="right" />
</a>
......
......@@ -15,7 +15,8 @@ const desc1 = (
}}
>
<div style={{ margin: '8px 0 4px' }}>
曲丽丽<Icon style={{ marginLeft: 8 }} type="dingding-o" />
曲丽丽
<Icon style={{ marginLeft: 8 }} type="dingding-o" />
</div>
<div>2016-12-12 12:32</div>
</div>
......@@ -24,7 +25,8 @@ const desc1 = (
const desc2 = (
<div style={{ fontSize: 12, position: 'relative', left: 42 }}>
<div style={{ margin: '8px 0 4px' }}>
周毛毛<Icon type="dingding-o" style={{ color: '#00A0E9', marginLeft: 8 }} />
周毛毛
<Icon type="dingding-o" style={{ color: '#00A0E9', marginLeft: 8 }} />
</div>
<div>
<a href="">催一下</a>
......
......@@ -23,7 +23,8 @@ export default ({ location }) => (
type="success"
title={
<div className={styles.title}>
你的账户{location.state ? location.state.account : 'AntDesign@example.com'} 注册成功
你的账户
{location.state ? location.state.account : 'AntDesign@example.com'} 注册成功
</div>
}
description="激活邮件已发送到你的邮箱中,邮件有效期为24小时。请及时登录邮箱,点击邮件中的链接激活帐户。"
......
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