diff --git a/.eslintrc.js b/.eslintrc.js index e56bd94bb959..05dc27863d87 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -23,7 +23,6 @@ const eslintrc = { 'babel', ], rules: { - 'comma-dangle': 0, 'func-names': 0, 'prefer-const': 0, 'arrow-body-style': 0, diff --git a/components/alert/index.jsx b/components/alert/index.jsx index b937402a84e9..d73a84f2d78f 100644 --- a/components/alert/index.jsx +++ b/components/alert/index.jsx @@ -15,7 +15,7 @@ export default class Alert extends React.Component { super(props); this.state = { closing: true, - closed: false + closed: false, }; } handleClose = (e) => { @@ -27,19 +27,19 @@ export default class Alert extends React.Component { dom.style.height = `${dom.offsetHeight}px`; this.setState({ - closing: false + closing: false, }); this.props.onClose.call(this, e); } animationEnd = () => { this.setState({ closed: true, - closing: true + closing: true, }); } render() { let { - closable, description, type, prefixCls, message, closeText, showIcon + closable, description, type, prefixCls, message, closeText, showIcon, } = this.props; let iconType = ''; diff --git a/components/badge/ScrollNumber.jsx b/components/badge/ScrollNumber.jsx index 245802632a8d..a957505f6cc7 100644 --- a/components/badge/ScrollNumber.jsx +++ b/components/badge/ScrollNumber.jsx @@ -22,7 +22,7 @@ export default class ScrollNumber extends React.Component { static propTypes = { count: React.PropTypes.oneOfType([ React.PropTypes.string, - React.PropTypes.number + React.PropTypes.number, ]), component: React.PropTypes.string, onAnimated: React.PropTypes.func, @@ -33,7 +33,7 @@ export default class ScrollNumber extends React.Component { super(props); this.state = { animateStarted: true, - count: props.count + count: props.count, }; } @@ -124,7 +124,7 @@ export default class ScrollNumber extends React.Component { render() { const props = { ...this.props, - className: `${this.props.prefixCls} ${this.props.className}` + className: `${this.props.prefixCls} ${this.props.className}`, }; return createElement( this.props.component, diff --git a/components/badge/demo/change.md b/components/badge/demo/change.md index 88e7ffe42f9d..ff7b51655836 100644 --- a/components/badge/demo/change.md +++ b/components/badge/demo/change.md @@ -56,7 +56,7 @@ const Test = React.createClass({ ); - } + }, }); ReactDOM.render( diff --git a/components/badge/index.jsx b/components/badge/index.jsx index 0371b5f2a7e2..dfb3ba0a7822 100644 --- a/components/badge/index.jsx +++ b/components/badge/index.jsx @@ -14,7 +14,7 @@ export default class Badge extends React.Component { static propTypes = { count: React.PropTypes.oneOfType([ React.PropTypes.string, - React.PropTypes.number + React.PropTypes.number, ]), dot: React.PropTypes.bool, overflowCount: React.PropTypes.number, diff --git a/components/breadcrumb/demo/router.md b/components/breadcrumb/demo/router.md index a208a1849495..1d355758f58e 100644 --- a/components/breadcrumb/demo/router.md +++ b/components/breadcrumb/demo/router.md @@ -36,7 +36,7 @@ function Home(props) { marginBottom: 15, marginTop: 15, paddingBottom: 15, - borderBottom: '1px dashed #ccc' + borderBottom: '1px dashed #ccc', }}> 点击上面的导航切换页面,面包屑在下面: diff --git a/components/button/button-group.jsx b/components/button/button-group.jsx index 6d9d53fdb306..d494a345e3b7 100644 --- a/components/button/button-group.jsx +++ b/components/button/button-group.jsx @@ -16,7 +16,7 @@ export default function ButtonGroup(props) { const classes = classNames({ 'ant-btn-group': true, [prefix + sizeCls]: sizeCls, - [className]: className + [className]: className, }); return
; diff --git a/components/button/demo/loading.md b/components/button/demo/loading.md index 15a012d19b5d..e590f8ce47ba 100644 --- a/components/button/demo/loading.md +++ b/components/button/demo/loading.md @@ -42,7 +42,7 @@ const App = React.createClass({
); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/calendar/demo/notice-calendar.md b/components/calendar/demo/notice-calendar.md index 480771f0b715..52065c2ee2b5 100644 --- a/components/calendar/demo/notice-calendar.md +++ b/components/calendar/demo/notice-calendar.md @@ -14,13 +14,13 @@ function getListData(value) { case 8: listData = [ { type: 'warning', content: '这里是警告事项.' }, - { type: 'normal', content: '这里是普通事项.' } + { type: 'normal', content: '这里是普通事项.' }, ]; break; case 10: listData = [ { type: 'warning', content: '这里是警告事项.' }, { type: 'normal', content: '这里是普通事项.' }, - { type: 'error', content: '这里是错误事项.' } + { type: 'error', content: '这里是错误事项.' }, ]; break; case 15: listData = [ @@ -29,7 +29,7 @@ function getListData(value) { { type: 'error', content: '这里是错误事项.' }, { type: 'error', content: '这里是错误事项.' }, { type: 'error', content: '这里是错误事项.' }, - { type: 'error', content: '这里是错误事项.' } + { type: 'error', content: '这里是错误事项.' }, ]; break; default: } diff --git a/components/calendar/index.jsx b/components/calendar/index.jsx index d62d5828d20e..d7cd687fb5c1 100644 --- a/components/calendar/index.jsx +++ b/components/calendar/index.jsx @@ -56,7 +56,7 @@ export default class Calendar extends React.Component { componentWillReceiveProps(nextProps) { if ('value' in nextProps) { this.setState({ - value: this.parseDateFromValue(nextProps.value) + value: this.parseDateFromValue(nextProps.value), }); } } diff --git a/components/checkbox/demo/controller.md b/components/checkbox/demo/controller.md index 6ee1d80e930f..19ccd6e2e6f0 100644 --- a/components/checkbox/demo/controller.md +++ b/components/checkbox/demo/controller.md @@ -12,7 +12,7 @@ const App = React.createClass({ getInitialState() { return { checked: true, - disabled: false + disabled: false, }; }, render() { @@ -51,7 +51,7 @@ const App = React.createClass({ this.setState({ checked: e.target.checked, }); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/checkbox/index.jsx b/components/checkbox/index.jsx index dc9ff8f9e5e8..a0ea3a4ff375 100644 --- a/components/checkbox/index.jsx +++ b/components/checkbox/index.jsx @@ -6,7 +6,7 @@ import classNames from 'classnames'; export default class Checkbox extends React.Component { static Group = CheckboxGroup; static defaultProps = { - prefixCls: 'ant-checkbox' + prefixCls: 'ant-checkbox', } render() { const { prefixCls, style, children, className, ...restProps } = this.props; diff --git a/components/date-picker/RangePicker.jsx b/components/date-picker/RangePicker.jsx index 79abde617710..b2d4f5c1417c 100644 --- a/components/date-picker/RangePicker.jsx +++ b/components/date-picker/RangePicker.jsx @@ -17,8 +17,8 @@ export default class RangePicker extends React.Component { this.state = { value: [ parseDateFromValue(start), - parseDateFromValue(end) - ] + parseDateFromValue(end), + ], }; } @@ -28,7 +28,7 @@ export default class RangePicker extends React.Component { const start = nextProps.parseDateFromValue(value[0]); const end = nextProps.parseDateFromValue(value[1]); this.setState({ - value: [start, end] + value: [start, end], }); } } diff --git a/components/date-picker/createPicker.jsx b/components/date-picker/createPicker.jsx index f9cf403d6f39..411d77cbb211 100644 --- a/components/date-picker/createPicker.jsx +++ b/components/date-picker/createPicker.jsx @@ -17,7 +17,7 @@ export default function createPicker(TheCalendar) { componentWillReceiveProps(nextProps) { if ('value' in nextProps) { this.setState({ - value: nextProps.parseDateFromValue(nextProps.value) + value: nextProps.parseDateFromValue(nextProps.value), }); } } diff --git a/components/date-picker/demo/start-end.md b/components/date-picker/demo/start-end.md index e6f02a740111..5f50ec665dfc 100644 --- a/components/date-picker/demo/start-end.md +++ b/components/date-picker/demo/start-end.md @@ -12,7 +12,7 @@ const DateRange = React.createClass({ getInitialState() { return { startValue: null, - endValue: null + endValue: null, }; }, disabledStartDate(startValue) { @@ -52,7 +52,7 @@ const DateRange = React.createClass({ onChange={this.onEndChange} /> ); - } + }, }); ReactDOM.render( diff --git a/components/date-picker/demo/with-time-picker.md b/components/date-picker/demo/with-time-picker.md index d5a9b0c49dac..f20848d73474 100644 --- a/components/date-picker/demo/with-time-picker.md +++ b/components/date-picker/demo/with-time-picker.md @@ -48,7 +48,7 @@ const DateTimePicker = React.createClass({ ); - } + }, }); function onSelect(value) { diff --git a/components/date-picker/wrapPicker.jsx b/components/date-picker/wrapPicker.jsx index 8337f78e7022..a1453f2443e3 100644 --- a/components/date-picker/wrapPicker.jsx +++ b/components/date-picker/wrapPicker.jsx @@ -17,7 +17,7 @@ export default function wrapPicker(Picker, defaultFormat) { align: { offset: [0, -9], }, - open: false + open: false, } static contextTypes = { @@ -67,7 +67,7 @@ export default function wrapPicker(Picker, defaultFormat) { toggleOpen = (e) => { this.setState({ - open: e.open + open: e.open, }); } @@ -76,7 +76,7 @@ export default function wrapPicker(Picker, defaultFormat) { const state = this.state; const pickerClass = classNames({ 'ant-calendar-picker': true, - 'ant-calendar-picker-open': state.open + 'ant-calendar-picker-open': state.open, }); const pickerInputClass = classNames({ 'ant-calendar-range-picker': true, @@ -91,7 +91,7 @@ export default function wrapPicker(Picker, defaultFormat) { const rcTimePickerProps = { formatter: new DateTimeFormat(timeFormat || 'HH:mm:ss'), showSecond: timeFormat && timeFormat.indexOf('ss') >= 0, - showHour: timeFormat && timeFormat.indexOf('HH') >= 0 + showHour: timeFormat && timeFormat.indexOf('HH') >= 0, }; const timePicker = props.showTime ? ( ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/form/demo/form-in-modal.md b/components/form/demo/form-in-modal.md index 4a1db28038a2..6971a2911542 100644 --- a/components/form/demo/form-in-modal.md +++ b/components/form/demo/form-in-modal.md @@ -54,7 +54,7 @@ let Demo = React.createClass({ ); - } + }, }); Demo = createForm()(Demo); diff --git a/components/form/demo/horizontal-form.md b/components/form/demo/horizontal-form.md index 464e6922e2d6..764bb4904058 100644 --- a/components/form/demo/horizontal-form.md +++ b/components/form/demo/horizontal-form.md @@ -58,7 +58,7 @@ let Demo = React.createClass({ ); - } + }, }); Demo = Form.create()(Demo); diff --git a/components/form/demo/inline-form.md b/components/form/demo/inline-form.md index 8fdb26887f6a..14e48202780b 100644 --- a/components/form/demo/inline-form.md +++ b/components/form/demo/inline-form.md @@ -35,7 +35,7 @@ let Demo = React.createClass({ ); - } + }, }); Demo = Form.create()(Demo); diff --git a/components/form/demo/mix.md b/components/form/demo/mix.md index 728a3d89ca58..cf3368dfe02c 100644 --- a/components/form/demo/mix.md +++ b/components/form/demo/mix.md @@ -142,7 +142,7 @@ let Demo = React.createClass({ + , ]; let footer = props.footer || defaultFooter; return ( diff --git a/components/modal/demo/async.md b/components/modal/demo/async.md index 806454becc13..e51af392b8f1 100644 --- a/components/modal/demo/async.md +++ b/components/modal/demo/async.md @@ -12,30 +12,30 @@ const Test = React.createClass({ getInitialState() { return { ModalText: '对话框的内容', - visible: false + visible: false, }; }, showModal() { this.setState({ - visible: true + visible: true, }); }, handleOk() { this.setState({ ModalText: '对话框将在两秒后关闭', - confirmLoading: true + confirmLoading: true, }); setTimeout(() => { this.setState({ visible: false, - confirmLoading: false + confirmLoading: false, }); }, 2000); }, handleCancel() { console.log('点击了取消'); this.setState({ - visible: false + visible: false, }); }, render() { @@ -51,7 +51,7 @@ const Test = React.createClass({ ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/modal/demo/basic.md b/components/modal/demo/basic.md index 294f0ccbe257..15ef92c0ef6b 100644 --- a/components/modal/demo/basic.md +++ b/components/modal/demo/basic.md @@ -14,19 +14,19 @@ const App = React.createClass({ }, showModal() { this.setState({ - visible: true + visible: true, }); }, handleOk() { console.log('点击了确定'); this.setState({ - visible: false + visible: false, }); }, handleCancel(e) { console.log(e); this.setState({ - visible: false + visible: false, }); }, render() { @@ -41,7 +41,7 @@ const App = React.createClass({ ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/modal/demo/confirm-promise.md b/components/modal/demo/confirm-promise.md index 5e2bf1bd8ebd..d0433877ca09 100644 --- a/components/modal/demo/confirm-promise.md +++ b/components/modal/demo/confirm-promise.md @@ -18,7 +18,7 @@ function showConfirm() { setTimeout(resolve, 1000); }); }, - onCancel() {} + onCancel() {}, }); } diff --git a/components/modal/demo/confirm.md b/components/modal/demo/confirm.md index 9d39e3e36a37..610cd4859e1e 100644 --- a/components/modal/demo/confirm.md +++ b/components/modal/demo/confirm.md @@ -16,7 +16,7 @@ function showConfirm() { onOk() { console.log('确定'); }, - onCancel() {} + onCancel() {}, }); } diff --git a/components/modal/demo/footer.md b/components/modal/demo/footer.md index 4770b7e38b45..14b7bfda0e1d 100644 --- a/components/modal/demo/footer.md +++ b/components/modal/demo/footer.md @@ -12,12 +12,12 @@ const Test = React.createClass({ getInitialState() { return { loading: false, - visible: false + visible: false, }; }, showModal() { this.setState({ - visible: true + visible: true, }); }, handleOk() { @@ -42,7 +42,7 @@ const Test = React.createClass({ , + , ]}>

对话框的内容

对话框的内容

@@ -52,7 +52,7 @@ const Test = React.createClass({ ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/modal/demo/locale.md b/components/modal/demo/locale.md index 2434ccf7fd8d..c81bd59a7ebf 100644 --- a/components/modal/demo/locale.md +++ b/components/modal/demo/locale.md @@ -14,17 +14,17 @@ const LocalizedModal = React.createClass({ }, showModal() { this.setState({ - visible: true + visible: true, }); }, handleOk() { this.setState({ - visible: false + visible: false, }); }, handleCancel() { this.setState({ - visible: false + visible: false, }); }, render() { @@ -40,7 +40,7 @@ const LocalizedModal = React.createClass({ ); - } + }, }); function confirm() { @@ -48,7 +48,7 @@ function confirm() { title: 'Confirm', content: 'Bla bla ...', okText: 'OK', - cancelText: 'Cancel' + cancelText: 'Cancel', }); } diff --git a/components/notification/demo/basic.md b/components/notification/demo/basic.md index 212216774ba7..0a28fc8a8b2a 100644 --- a/components/notification/demo/basic.md +++ b/components/notification/demo/basic.md @@ -11,7 +11,7 @@ import { Button, notification } from 'antd'; const openNotification = function () { notification.open({ message: '这是标题', - description: '这是提示框的文案这是提示框的文案这是提示框的文案这是提示框的文案这是提示框的文案这是提示框的文案这是提示框的文案' + description: '这是提示框的文案这是提示框的文案这是提示框的文案这是提示框的文案这是提示框的文案这是提示框的文案这是提示框的文案', }); }; diff --git a/components/notification/demo/duration.md b/components/notification/demo/duration.md index 5eed72c3d741..00792e406806 100644 --- a/components/notification/demo/duration.md +++ b/components/notification/demo/duration.md @@ -12,7 +12,7 @@ const openNotification = function () { const args = { message: '这是标题', description: '我不会自动关闭,我不会自动关闭,我不会自动关闭,我不会自动关闭,我不会自动关闭,我不会自动关闭,我不会自动关闭', - duration: 0 + duration: 0, }; notification.open(args); }; diff --git a/components/notification/demo/with-btn.md b/components/notification/demo/with-btn.md index 59c5b4bd3abc..ebfce74706c8 100644 --- a/components/notification/demo/with-btn.md +++ b/components/notification/demo/with-btn.md @@ -28,7 +28,7 @@ const openNotification = function () { description: '这是提示框的文案这是提示框示框的文案这是提示是提示框的文案这是提示框的文案', btn, key, - onClose: close + onClose: close, }); }; diff --git a/components/notification/demo/with-icon.md b/components/notification/demo/with-icon.md index fe759d18851b..83d5dde0f91c 100644 --- a/components/notification/demo/with-icon.md +++ b/components/notification/demo/with-icon.md @@ -12,7 +12,7 @@ const openNotificationWithIcon = function (type) { return function () { notification[type]({ message: '这是标题', - description: '这是提示框的文案这是提示框示框的文案这是提示是提示框的文案这是提示框的文案' + description: '这是提示框的文案这是提示框示框的文案这是提示是提示框的文案这是提示框的文案', }); }; }; diff --git a/components/notification/index.jsx b/components/notification/index.jsx index 6e0aa4a80702..5da374e52492 100644 --- a/components/notification/index.jsx +++ b/components/notification/index.jsx @@ -16,7 +16,7 @@ function getNotificationInstance() { style: { top: defaultTop, right: 0, - } + }, }); return notificationInstance; } diff --git a/components/pagination/demo/controlled.md b/components/pagination/demo/controlled.md index 197835e25750..d26fc8ead974 100644 --- a/components/pagination/demo/controlled.md +++ b/components/pagination/demo/controlled.md @@ -11,18 +11,18 @@ import { Pagination } from 'antd'; const Container = React.createClass({ getInitialState() { return { - current: 3 + current: 3, }; }, onChange(page) { console.log(page); this.setState({ - current: page + current: page, }); }, render() { return ; - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/popconfirm/demo/dynamic-trigger.md b/components/popconfirm/demo/dynamic-trigger.md index 1f8b3ab21421..dfd185ad33fa 100644 --- a/components/popconfirm/demo/dynamic-trigger.md +++ b/components/popconfirm/demo/dynamic-trigger.md @@ -52,7 +52,7 @@ let App = React.createClass({ 点击是否直接执行: ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/popconfirm/index.jsx b/components/popconfirm/index.jsx index 45d81f300b3c..95b66c172a0c 100644 --- a/components/popconfirm/index.jsx +++ b/components/popconfirm/index.jsx @@ -26,7 +26,7 @@ export default class Popconfirm extends React.Component { constructor(props) { super(props); this.state = { - visible: false + visible: false, }; } diff --git a/components/popover/demo/control.md b/components/popover/demo/control.md index bf49b54f7042..e9aaab40c97e 100644 --- a/components/popover/demo/control.md +++ b/components/popover/demo/control.md @@ -11,12 +11,12 @@ import { Popover, Button } from 'antd'; const App = React.createClass({ getInitialState() { return { - visible: false + visible: false, }; }, hide() { this.setState({ - visible: false + visible: false, }); }, handleVisibleChange(visible) { @@ -34,7 +34,7 @@ const App = React.createClass({ ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/progress/demo/circle-dynamic.md b/components/progress/demo/circle-dynamic.md index 5cf6241f560f..20fe3273741e 100644 --- a/components/progress/demo/circle-dynamic.md +++ b/components/progress/demo/circle-dynamic.md @@ -12,7 +12,7 @@ const ButtonGroup = Button.Group; const MyProgress = React.createClass({ getInitialState() { return { - percent: 0 + percent: 0, }; }, increase() { @@ -39,7 +39,7 @@ const MyProgress = React.createClass({ ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/progress/demo/dynamic.md b/components/progress/demo/dynamic.md index c35599a68c91..92af8aa37090 100644 --- a/components/progress/demo/dynamic.md +++ b/components/progress/demo/dynamic.md @@ -12,7 +12,7 @@ const ButtonGroup = Button.Group; const MyProgress = React.createClass({ getInitialState() { return { - percent: 0 + percent: 0, }; }, increase() { @@ -39,7 +39,7 @@ const MyProgress = React.createClass({ ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/progress/progress.jsx b/components/progress/progress.jsx index d2e5e8ddd6ff..f7adf5b524fd 100644 --- a/components/progress/progress.jsx +++ b/components/progress/progress.jsx @@ -6,7 +6,7 @@ import classNames from 'classnames'; const statusColorMap = { normal: '#2db7f5', exception: '#ff5500', - success: '#87d068' + success: '#87d068', }; export default class Line extends React.Component { diff --git a/components/queue-anim/demo/basic.md b/components/queue-anim/demo/basic.md index 5dd6f9cafd09..b6c93096ee38 100644 --- a/components/queue-anim/demo/basic.md +++ b/components/queue-anim/demo/basic.md @@ -11,12 +11,12 @@ import { QueueAnim, Button } from 'antd'; const Test = React.createClass({ getInitialState() { return { - show: true + show: true, }; }, onClick() { this.setState({ - show: !this.state.show + show: !this.state.show, }); }, render() { @@ -37,7 +37,7 @@ const Test = React.createClass({
  • - + , ] : null; return (
    @@ -49,7 +49,7 @@ const Test = React.createClass({
    ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/queue-anim/demo/change.md b/components/queue-anim/demo/change.md index 91ae881eec05..cf54004fc0ad 100644 --- a/components/queue-anim/demo/change.md +++ b/components/queue-anim/demo/change.md @@ -15,7 +15,7 @@ const Test = React.createClass({ items: [
  • ,
  • , -
  • +
  • , ], }; }, @@ -60,7 +60,7 @@ const Test = React.createClass({ ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/queue-anim/demo/custom.md b/components/queue-anim/demo/custom.md index ebc5d65ef4fb..dd2639e39e2c 100644 --- a/components/queue-anim/demo/custom.md +++ b/components/queue-anim/demo/custom.md @@ -37,7 +37,7 @@ const Test = React.createClass({
  • - + , ] : null; return (
    @@ -47,13 +47,13 @@ const Test = React.createClass({ {list}
    ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/queue-anim/demo/enter-leave.md b/components/queue-anim/demo/enter-leave.md index 082144cc7799..3b69e132e773 100644 --- a/components/queue-anim/demo/enter-leave.md +++ b/components/queue-anim/demo/enter-leave.md @@ -11,12 +11,12 @@ import { QueueAnim, Button } from 'antd'; const Test = React.createClass({ getInitialState() { return { - show: true + show: true, }; }, onClick() { this.setState({ - show: !this.state.show + show: !this.state.show, }); }, render() { @@ -37,7 +37,7 @@ const Test = React.createClass({
  • - + , ] : null; return (
    @@ -52,7 +52,7 @@ const Test = React.createClass({
    ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/queue-anim/demo/form.md b/components/queue-anim/demo/form.md index 04a1b23a7141..36f211fcea00 100644 --- a/components/queue-anim/demo/form.md +++ b/components/queue-anim/demo/form.md @@ -13,12 +13,12 @@ const RadioGroup = Radio.Group; const Test = React.createClass({ getInitialState() { return { - show: true + show: true, }; }, onClick() { this.setState({ - show: !this.state.show + show: !this.state.show, }); }, render() { @@ -57,7 +57,7 @@ const Test = React.createClass({ ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/queue-anim/demo/page.md b/components/queue-anim/demo/page.md index 96a36c61b6f6..6ace0d5ad15e 100644 --- a/components/queue-anim/demo/page.md +++ b/components/queue-anim/demo/page.md @@ -11,12 +11,12 @@ import { QueueAnim, Button } from 'antd'; const Test = React.createClass({ getInitialState() { return { - show: true + show: true, }; }, onClick() { this.setState({ - show: !this.state.show + show: !this.state.show, }); }, render() { @@ -59,7 +59,7 @@ const Test = React.createClass({ ,
    -
    + , ] : null; return (
    @@ -69,7 +69,7 @@ const Test = React.createClass({ {page}
    ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/radio/demo/disable.md b/components/radio/demo/disable.md index d42089dab0f1..eb4eb2b9d61e 100644 --- a/components/radio/demo/disable.md +++ b/components/radio/demo/disable.md @@ -11,12 +11,12 @@ import { Radio, Button } from 'antd'; const App = React.createClass({ getInitialState() { return { - disabled: true + disabled: true, }; }, toggleDisabled() { this.setState({ - disabled: !this.state.disabled + disabled: !this.state.disabled, }); }, render() { @@ -32,7 +32,7 @@ const App = React.createClass({ ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/radio/demo/radiogroup-more.md b/components/radio/demo/radiogroup-more.md index 040960e78a12..d5fbeb986f43 100644 --- a/components/radio/demo/radiogroup-more.md +++ b/components/radio/demo/radiogroup-more.md @@ -38,7 +38,7 @@ const App = React.createClass({ ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/radio/demo/radiogroup.md b/components/radio/demo/radiogroup.md index 226d8a68d98e..e1b4a45176c7 100644 --- a/components/radio/demo/radiogroup.md +++ b/components/radio/demo/radiogroup.md @@ -30,7 +30,7 @@ const App = React.createClass({ D ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/radio/radio.jsx b/components/radio/radio.jsx index c858884fd6e1..2afda2ea752b 100644 --- a/components/radio/radio.jsx +++ b/components/radio/radio.jsx @@ -4,7 +4,7 @@ import classNames from 'classnames'; export default class Radio extends React.Component { static defaultProps = { - prefixCls: 'ant-radio' + prefixCls: 'ant-radio', } render() { const { prefixCls, children, checked, disabled, className, style } = this.props; diff --git a/components/rate/demo/text.md b/components/rate/demo/text.md index 886cbe7fbdfc..dfccb849f298 100644 --- a/components/rate/demo/text.md +++ b/components/rate/demo/text.md @@ -26,7 +26,7 @@ const Rater = React.createClass({ {value && {value} 星} ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/select/demo/combobox.md b/components/select/demo/combobox.md index edd5892aab67..e4b1555a0d01 100644 --- a/components/select/demo/combobox.md +++ b/components/select/demo/combobox.md @@ -38,7 +38,7 @@ const Test = React.createClass({ {this.state.options} ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/select/demo/coordinate.md b/components/select/demo/coordinate.md index e367a6dc89d4..9da433bc282b 100644 --- a/components/select/demo/coordinate.md +++ b/components/select/demo/coordinate.md @@ -14,25 +14,25 @@ const Option = Select.Option; const provinceData = ['浙江', '江苏']; const cityData = { 浙江: ['杭州', '宁波', '温州'], - 江苏: ['南京', '苏州', '镇江'] + 江苏: ['南京', '苏州', '镇江'], }; const App = React.createClass({ getInitialState() { return { cities: cityData[provinceData[0]], - secondCity: cityData[provinceData[0]][0] + secondCity: cityData[provinceData[0]][0], }; }, handleProvinceChange(value) { this.setState({ cities: cityData[value], - secondCity: cityData[value][0] + secondCity: cityData[value][0], }); }, onSecondCityChange(value) { this.setState({ - secondCity: value + secondCity: value, }); }, render() { @@ -48,7 +48,7 @@ const App = React.createClass({ ); - } + }, }); ReactDOM.render(, mountNode); ```` diff --git a/components/slider/demo/icon-slider.md b/components/slider/demo/icon-slider.md index b2fef3a7e975..abff5d53a0b0 100644 --- a/components/slider/demo/icon-slider.md +++ b/components/slider/demo/icon-slider.md @@ -17,7 +17,7 @@ const IconSlider = React.createClass({ preIconClass: this.props.value >= mid ? '' : 'anticon-highlight', nextIconClass: this.props.value >= mid ? 'anticon-highlight' : '', mid, - sliderValue: this.props.value + sliderValue: this.props.value, }; }, @@ -25,7 +25,7 @@ const IconSlider = React.createClass({ this.setState({ preIconClass: v >= this.state.mid ? '' : 'anticon-highlight', nextIconClass: v >= this.state.mid ? 'anticon-highlight' : '', - sliderValue: v + sliderValue: v, }); }, @@ -37,7 +37,7 @@ const IconSlider = React.createClass({ ); - } + }, }); ReactDOM.render( diff --git a/components/slider/demo/input-number.md b/components/slider/demo/input-number.md index 91be721b815e..8e3d9873d2cb 100644 --- a/components/slider/demo/input-number.md +++ b/components/slider/demo/input-number.md @@ -11,12 +11,12 @@ import { Slider, InputNumber, Row, Col } from 'antd'; const IntegerStep = React.createClass({ getInitialState() { return { - inputValue: 1 + inputValue: 1, }; }, onChange(value) { this.setState({ - inputValue: value + inputValue: value, }); }, render() { @@ -31,18 +31,18 @@ const IntegerStep = React.createClass({ ); - } + }, }); const DecimalStep = React.createClass({ getInitialState() { return { - inputValue: 0 + inputValue: 0, }; }, onChange(value) { this.setState({ - inputValue: value + inputValue: value, }); }, render() { @@ -57,7 +57,7 @@ const DecimalStep = React.createClass({ ); - } + }, }); ReactDOM.render(
    diff --git a/components/slider/index.jsx b/components/slider/index.jsx index c92f070b60d7..37454cb08d83 100644 --- a/components/slider/index.jsx +++ b/components/slider/index.jsx @@ -4,7 +4,7 @@ import RcSlider from 'rc-slider'; export default class Slider extends React.Component { static defaultProps = { prefixCls: 'ant-slider', - tipTransitionName: 'zoom-down' + tipTransitionName: 'zoom-down', } render() { diff --git a/components/spin/demo/nested.md b/components/spin/demo/nested.md index 6d0ed1ef4cbb..61470113b04a 100644 --- a/components/spin/demo/nested.md +++ b/components/spin/demo/nested.md @@ -27,7 +27,7 @@ const Card = React.createClass({ 切换加载状态:
    ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/steps/demo/error.md b/components/steps/demo/error.md index d3b6d3d73ba0..c990961ebcf8 100644 --- a/components/steps/demo/error.md +++ b/components/steps/demo/error.md @@ -11,16 +11,16 @@ const Step = Steps.Step; const steps = [{ title: '已完成', - description: '这里是多信息的描述啊' + description: '这里是多信息的描述啊', }, { title: '错误示例', - description: '这里是多信息的耶哦耶哦哦耶哦耶' + description: '这里是多信息的耶哦耶哦哦耶哦耶', }, { title: '又一个待运行', - description: '描述啊描述啊' + description: '描述啊描述啊', }, { title: '待运行', - description: '这里是多信息的描述啊' + description: '这里是多信息的描述啊', }].map((s, i) => ); ReactDOM.render({steps}, mountNode); diff --git a/components/steps/demo/simple.md b/components/steps/demo/simple.md index 6cca51353a80..f482f747aaa0 100644 --- a/components/steps/demo/simple.md +++ b/components/steps/demo/simple.md @@ -11,16 +11,16 @@ const Step = Steps.Step; const steps = [{ title: '已完成', - description: '这里是多信息的描述啊' + description: '这里是多信息的描述啊', }, { title: '进行中', - description: '这里是多信息的耶哦耶哦哦耶哦耶' + description: '这里是多信息的耶哦耶哦哦耶哦耶', }, { title: '又一个待运行', - description: '描述啊描述啊' + description: '描述啊描述啊', }, { title: '待运行', - description: '这里是多信息的描述啊' + description: '这里是多信息的描述啊', }].map((s, i) => ); ReactDOM.render({steps}, mountNode); diff --git a/components/steps/demo/small-size.md b/components/steps/demo/small-size.md index a1c175fbc8fe..bc97911a1806 100644 --- a/components/steps/demo/small-size.md +++ b/components/steps/demo/small-size.md @@ -11,16 +11,16 @@ const Step = Steps.Step; const steps = [{ status: 'finish', - title: '已完成' + title: '已完成', }, { status: 'process', - title: '进行中' + title: '进行中', }, { status: 'wait', - title: '待运行' + title: '待运行', }, { status: 'wait', - title: '待运行' + title: '待运行', }].map((s, i) => ); ReactDOM.render({steps}, mountNode); diff --git a/components/steps/demo/step-next.md b/components/steps/demo/step-next.md index d2b0da3d7d7f..1b0f088838da 100644 --- a/components/steps/demo/step-next.md +++ b/components/steps/demo/step-next.md @@ -17,14 +17,14 @@ const Step = Steps.Step; const array = Array.apply(null, Array(Math.floor(Math.random() * 3) + 3)); const steps = array.map((item, i) => { return { - title: `步骤${i + 1}` + title: `步骤${i + 1}`, }; }); const App = React.createClass({ getInitialState() { return { - currentStep: Math.floor(Math.random() * steps.length) + currentStep: Math.floor(Math.random() * steps.length), }; }, next() { @@ -33,7 +33,7 @@ const App = React.createClass({ s = 0; } this.setState({ - currentStep: s + currentStep: s, }); }, render() { @@ -49,7 +49,7 @@ const App = React.createClass({ ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/steps/demo/vertical-small.md b/components/steps/demo/vertical-small.md index 54481b831fa2..5d5e0bda392d 100644 --- a/components/steps/demo/vertical-small.md +++ b/components/steps/demo/vertical-small.md @@ -11,13 +11,13 @@ const Step = Steps.Step; const steps = [{ title: '已完成', - description: '这里是信息的描述' + description: '这里是信息的描述', }, { title: '进行中', - description: '这里是信息的描述' + description: '这里是信息的描述', }, { title: '待运行', - description: '这里是信息的描述' + description: '这里是信息的描述', }].map((s, i) => ); ReactDOM.render({steps}, diff --git a/components/steps/demo/vertical.md b/components/steps/demo/vertical.md index d9514d1100bb..ae9b8bfc6f8c 100644 --- a/components/steps/demo/vertical.md +++ b/components/steps/demo/vertical.md @@ -11,16 +11,16 @@ const Step = Steps.Step; const steps = [{ title: '已完成', - description: '这里是信息的描述' + description: '这里是信息的描述', }, { title: '进行中', - description: '这里是信息的描述' + description: '这里是信息的描述', }, { title: '待运行', - description: '这里是信息的描述' + description: '这里是信息的描述', }, { title: '又一个待运行', - description: '这里是信息的描述' + description: '这里是信息的描述', }].map((s, i) => ); ReactDOM.render({steps}, diff --git a/components/switch/demo/disabled.md b/components/switch/demo/disabled.md index a13391f12076..4fb17ba1fb4b 100644 --- a/components/switch/demo/disabled.md +++ b/components/switch/demo/disabled.md @@ -11,12 +11,12 @@ import { Switch, Button } from 'antd'; const Test = React.createClass({ getInitialState() { return { - disabled: true + disabled: true, }; }, toggle() { this.setState({ - disabled: !this.state.disabled + disabled: !this.state.disabled, }); }, render() { @@ -28,7 +28,7 @@ const Test = React.createClass({ ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/table/demo/ajax.md b/components/table/demo/ajax.md index 7609ae377bb4..5a4e9ee58f6e 100644 --- a/components/table/demo/ajax.md +++ b/components/table/demo/ajax.md @@ -69,7 +69,7 @@ const Test = React.createClass({ data: result.data, pagination, }); - } + }, }); }, componentDidMount() { @@ -83,7 +83,7 @@ const Test = React.createClass({ loading={this.state.loading} onChange={this.handleTableChange} /> ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/table/demo/bordered.md b/components/table/demo/bordered.md index d72bb3ef057c..771132d40091 100644 --- a/components/table/demo/bordered.md +++ b/components/table/demo/bordered.md @@ -13,7 +13,7 @@ const columns = [{ dataIndex: 'name', render(text) { return {text}; - } + }, }, { title: '资产', className: 'column-money', diff --git a/components/table/demo/colspan-rowspan.md b/components/table/demo/colspan-rowspan.md index d8625d3ed055..b1b37df4e9f6 100644 --- a/components/table/demo/colspan-rowspan.md +++ b/components/table/demo/colspan-rowspan.md @@ -15,7 +15,7 @@ import { Table } from 'antd'; const renderContent = function (value, row, index) { let obj = { children: value, - props: {} + props: {}, }; if (index === 4) { obj.props.colSpan = 0; @@ -33,14 +33,14 @@ const columns = [{ return { children: {text}, props: { - colSpan: 5 - } + colSpan: 5, + }, }; - } + }, }, { title: '年龄', dataIndex: 'age', - render: renderContent + render: renderContent, }, { title: '家庭电话', colSpan: 2, @@ -48,7 +48,7 @@ const columns = [{ render(value, row, index) { let obj = { children: value, - props: {} + props: {}, }; // 第三列的第三行行合并 if (index === 2) { @@ -64,16 +64,16 @@ const columns = [{ obj.props.colSpan = 0; } return obj; - } + }, }, { title: '手机号', colSpan: 0, dataIndex: 'phone', - render: renderContent + render: renderContent, }, { title: '住址', dataIndex: 'address', - render: renderContent + render: renderContent, }]; const data = [{ diff --git a/components/table/demo/fixed-header.md b/components/table/demo/fixed-header.md index 21b8214dcab7..7014cddc56cf 100644 --- a/components/table/demo/fixed-header.md +++ b/components/table/demo/fixed-header.md @@ -29,7 +29,7 @@ for (let i = 0; i < 100; i++) { key: i, name: `李大嘴${i}`, age: 32, - address: `西湖区湖底公园${i}号` + address: `西湖区湖底公园${i}号`, }); } diff --git a/components/table/demo/loading.md b/components/table/demo/loading.md index a70f860e82a8..7a6035a7c6f4 100644 --- a/components/table/demo/loading.md +++ b/components/table/demo/loading.md @@ -38,12 +38,12 @@ const data = [{ const App = React.createClass({ getInitialState() { return { - loading: false + loading: false, }; }, toggleLoading() { this.setState({ - loading: !this.state.loading + loading: !this.state.loading, }); }, render() { @@ -53,7 +53,7 @@ const App = React.createClass({ ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/table/demo/nopagination.md b/components/table/demo/nopagination.md index b9e163026966..dcbcfeb950d5 100644 --- a/components/table/demo/nopagination.md +++ b/components/table/demo/nopagination.md @@ -23,17 +23,17 @@ const data = [{ key: '1', name: '胡彦斌', age: 32, - address: '西湖区湖底公园1号' + address: '西湖区湖底公园1号', }, { key: '2', name: '胡彦祖', age: 42, - address: '西湖区湖底公园1号' + address: '西湖区湖底公园1号', }, { key: '3', name: '李大嘴', age: 32, - address: '西湖区湖底公园1号' + address: '西湖区湖底公园1号', }]; ReactDOM.render( diff --git a/components/table/demo/paging.md b/components/table/demo/paging.md index a5b571e9d2ba..cc2494d8c009 100644 --- a/components/table/demo/paging.md +++ b/components/table/demo/paging.md @@ -13,13 +13,13 @@ const columns = [{ dataIndex: 'name', render(text) { return {text}; - } + }, }, { title: '年龄', - dataIndex: 'age' + dataIndex: 'age', }, { title: '住址', - dataIndex: 'address' + dataIndex: 'address', }]; const data = []; @@ -28,7 +28,7 @@ for (let i = 0; i < 46; i++) { key: i, name: `李大嘴${i}`, age: 32, - address: `西湖区湖底公园${i}号` + address: `西湖区湖底公园${i}号`, }); } diff --git a/components/table/demo/reset-filter.md b/components/table/demo/reset-filter.md index f3498d5823d2..25bba29a9f4a 100644 --- a/components/table/demo/reset-filter.md +++ b/components/table/demo/reset-filter.md @@ -115,7 +115,7 @@ const App = React.createClass({
    ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/table/demo/row-selection-and-operation.md b/components/table/demo/row-selection-and-operation.md index 5a445c67998d..1aa99d5cade9 100644 --- a/components/table/demo/row-selection-and-operation.md +++ b/components/table/demo/row-selection-and-operation.md @@ -67,7 +67,7 @@ const App = React.createClass({
    ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/table/demo/row-selection.md b/components/table/demo/row-selection.md index f2fe41fed3f5..90d2850d0ed6 100644 --- a/components/table/demo/row-selection.md +++ b/components/table/demo/row-selection.md @@ -16,7 +16,7 @@ const columns = [{ }, }, { title: '年龄', - dataIndex: 'age' + dataIndex: 'age', }, { title: '住址', dataIndex: 'address', diff --git a/components/table/filterDropdown.jsx b/components/table/filterDropdown.jsx index a862d2c67c1b..7a2c28f21bee 100644 --- a/components/table/filterDropdown.jsx +++ b/components/table/filterDropdown.jsx @@ -7,7 +7,7 @@ import Checkbox from '../checkbox'; export default class FilterMenu extends React.Component { static defaultProps = { handleFilter() {}, - column: null + column: null, } constructor(props) { @@ -22,7 +22,7 @@ export default class FilterMenu extends React.Component { componentWillReceiveProps(nextProps) { this.setState({ - selectedKeys: nextProps.selectedKeys + selectedKeys: nextProps.selectedKeys, }); } @@ -32,13 +32,13 @@ export default class FilterMenu extends React.Component { handleClearFilters = () => { this.setState({ - selectedKeys: [] + selectedKeys: [], }, this.handleConfirm); } handleConfirm = () => { this.setState({ - visible: false + visible: false, }); this.props.confirmFilter(this.props.column, this.state.selectedKeys); } diff --git a/components/table/index.jsx b/components/table/index.jsx index 54f5e7c7d77d..d2e5a1a90828 100644 --- a/components/table/index.jsx +++ b/components/table/index.jsx @@ -55,7 +55,7 @@ export default class Table extends React.Component { bordered: false, indentSize: 20, onChange: noop, - locale: {} + locale: {}, } static contextTypes = { @@ -468,7 +468,7 @@ export default class Table extends React.Component { selectionColumn = { key: 'selection-column', render: this.renderSelectionRadio, - className: 'ant-table-selection-column' + className: 'ant-table-selection-column', }; } else { const checkboxAllDisabled = data.every(item => @@ -483,7 +483,7 @@ export default class Table extends React.Component { key: 'selection-column', title: checkboxAll, render: this.renderSelectionCheckBox, - className: 'ant-table-selection-column' + className: 'ant-table-selection-column', }; } if (columns[0] && columns[0].key === 'selection-column') { diff --git a/components/tabs/demo/editable-card.md b/components/tabs/demo/editable-card.md index 4dff03f33b34..a462b4d77857 100644 --- a/components/tabs/demo/editable-card.md +++ b/components/tabs/demo/editable-card.md @@ -54,7 +54,7 @@ const Demo = React.createClass({ {this.state.panes} ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/tabs/demo/position.md b/components/tabs/demo/position.md index df911b256cfd..31b91ca01cc4 100644 --- a/components/tabs/demo/position.md +++ b/components/tabs/demo/position.md @@ -39,7 +39,7 @@ const Demo = React.createClass({ ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/tag/demo/control.md b/components/tag/demo/control.md index af4c1176074b..32f4ec9921b7 100644 --- a/components/tag/demo/control.md +++ b/components/tag/demo/control.md @@ -44,7 +44,7 @@ const App = React.createClass({ ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/time-picker/demo/value.md b/components/time-picker/demo/value.md index 0189dc2a8e6a..0103cbccec2b 100644 --- a/components/time-picker/demo/value.md +++ b/components/time-picker/demo/value.md @@ -20,7 +20,7 @@ const Test = React.createClass({ }, render() { return ; - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/tooltip/index.jsx b/components/tooltip/index.jsx index 9c4962e4bd1e..2801b14202a9 100644 --- a/components/tooltip/index.jsx +++ b/components/tooltip/index.jsx @@ -84,7 +84,7 @@ export default class Tooltip extends React.Component { onPopupAlign={this.onPopupAlign} ref="tooltip" {...this.props}> - {visible ? cloneElement(children, { className: childrenCls, }) : children} + {visible ? cloneElement(children, { className: childrenCls }) : children} ); } diff --git a/components/transfer/demo/advanced.md b/components/transfer/demo/advanced.md index 7079605ebac4..d2a1e610055e 100644 --- a/components/transfer/demo/advanced.md +++ b/components/transfer/demo/advanced.md @@ -26,7 +26,7 @@ const App = React.createClass({ key: i, title: `内容${i + 1}`, description: `内容${i + 1}的描述`, - chosen: Math.random() * 2 > 1 + chosen: Math.random() * 2 > 1, }; if (data.chosen) { targetKeys.push(data.key); @@ -61,7 +61,7 @@ const App = React.createClass({ render={item => `${item.title}-${item.description}`} footer={this.renderFooter} /> ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/transfer/demo/basic.md b/components/transfer/demo/basic.md index c865ac6d0b0b..8227fcd2a343 100644 --- a/components/transfer/demo/basic.md +++ b/components/transfer/demo/basic.md @@ -26,7 +26,7 @@ const App = React.createClass({ key: i, title: `内容${i + 1}`, description: `内容${i + 1}的描述`, - chosen: Math.random() * 2 > 1 + chosen: Math.random() * 2 > 1, }; if (data.chosen) { targetKeys.push(data.key); @@ -55,7 +55,7 @@ const App = React.createClass({ onChange={this.handleChange} render={item => item.title} /> ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/transfer/demo/search.md b/components/transfer/demo/search.md index 2e571a162ab9..9e20cbbe8633 100644 --- a/components/transfer/demo/search.md +++ b/components/transfer/demo/search.md @@ -26,7 +26,7 @@ const App = React.createClass({ key: i, title: `内容${i + 1}`, description: `内容${i + 1}的描述`, - chosen: Math.random() * 2 > 1 + chosen: Math.random() * 2 > 1, }; if (data.chosen) { targetKeys.push(data.key); @@ -48,7 +48,7 @@ const App = React.createClass({ onChange={this.handleChange} render={item => item.title} /> ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/transfer/list.jsx b/components/transfer/list.jsx index 184dd386a1fb..ef80360280c2 100644 --- a/components/transfer/list.jsx +++ b/components/transfer/list.jsx @@ -147,7 +147,7 @@ export default class TransferList extends React.Component { prefixCls: 'ant-transfer', checked: checkStatus === 'all', checkPart: checkStatus === 'part', - checkable: + checkable: , })} diff --git a/components/tree-select/index.jsx b/components/tree-select/index.jsx index 3c9f4e7f60cd..0959271a8939 100644 --- a/components/tree-select/index.jsx +++ b/components/tree-select/index.jsx @@ -23,7 +23,7 @@ export default class TreeSelect extends React.Component { render() { const props = this.props; let { - size, className, combobox, notFoundContent, prefixCls + size, className, combobox, notFoundContent, prefixCls, } = this.props; const cls = classNames({ diff --git a/components/upload/demo/basic.md b/components/upload/demo/basic.md index 905d0e1ebe12..93c38b748465 100644 --- a/components/upload/demo/basic.md +++ b/components/upload/demo/basic.md @@ -23,7 +23,7 @@ const props = { } else if (info.file.status === 'error') { message.error(`${info.file.name} 上传失败。`); } - } + }, }; ReactDOM.render( diff --git a/components/upload/demo/beforeUpload.md b/components/upload/demo/beforeUpload.md index 4fe1dc965bfa..6781a8bfebc2 100644 --- a/components/upload/demo/beforeUpload.md +++ b/components/upload/demo/beforeUpload.md @@ -16,7 +16,7 @@ const props = { message.error('只能上传 JPG 文件哦!'); } return isJPG; - } + }, }; ReactDOM.render( diff --git a/components/upload/demo/defaultFileList.md b/components/upload/demo/defaultFileList.md index 0a46ab0b539f..f9a8d9610ea3 100644 --- a/components/upload/demo/defaultFileList.md +++ b/components/upload/demo/defaultFileList.md @@ -20,13 +20,13 @@ const props = { uid: -1, name: 'xxx.png', status: 'done', - url: 'http://www.baidu.com/xxx.png' + url: 'http://www.baidu.com/xxx.png', }, { uid: -2, name: 'yyy.png', status: 'done', - url: 'http://www.baidu.com/yyy.png' - }] + url: 'http://www.baidu.com/yyy.png', + }], }; ReactDOM.render( diff --git a/components/upload/demo/fileList.md b/components/upload/demo/fileList.md index 53937652047e..3df1ce3224c5 100644 --- a/components/upload/demo/fileList.md +++ b/components/upload/demo/fileList.md @@ -21,8 +21,8 @@ const MyUpload = React.createClass({ uid: -1, name: 'xxx.png', status: 'done', - url: 'http://www.baidu.com/xxx.png' - }] + url: 'http://www.baidu.com/xxx.png', + }], }; }, handleChange(info) { @@ -55,7 +55,7 @@ const MyUpload = React.createClass({ const props = { action: '/upload.do', onChange: this.handleChange, - multiple: true + multiple: true, }; return ( @@ -64,7 +64,7 @@ const MyUpload = React.createClass({ ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/upload/demo/multiple.md b/components/upload/demo/multiple.md index 10ba33148f91..be410c961695 100644 --- a/components/upload/demo/multiple.md +++ b/components/upload/demo/multiple.md @@ -21,7 +21,7 @@ const props = { } else if (info.file.status === 'error') { message.error(`${info.file.name} 上传失败。`); } - } + }, }; ReactDOM.render( diff --git a/components/upload/demo/picture-card.md b/components/upload/demo/picture-card.md index 0e742466dbef..9cf25e24bd2e 100644 --- a/components/upload/demo/picture-card.md +++ b/components/upload/demo/picture-card.md @@ -36,7 +36,7 @@ const ImageUploadList = React.createClass({ priviewImage: file.url, priviewVisible: true, }); - } + }, }; return (
    @@ -53,7 +53,7 @@ const ImageUploadList = React.createClass({
    ); - } + }, }); ReactDOM.render(, mountNode); diff --git a/components/upload/demo/picture-style.md b/components/upload/demo/picture-style.md index 4420b6e9e30d..95bcde1d01db 100644 --- a/components/upload/demo/picture-style.md +++ b/components/upload/demo/picture-style.md @@ -25,7 +25,7 @@ const props = { status: 'done', url: 'https://os.alipayobjects.com/rmsportal/NDbkJhpzmLxtPhB.png', thumbUrl: 'https://os.alipayobjects.com/rmsportal/NDbkJhpzmLxtPhB.png', - }] + }], }; ReactDOM.render( diff --git a/components/upload/index.jsx b/components/upload/index.jsx index c8f2e15cc711..6b522abe5733 100644 --- a/components/upload/index.jsx +++ b/components/upload/index.jsx @@ -78,7 +78,7 @@ export default class Upload extends React.Component { super(props); this.state = { fileList: this.props.fileList || this.props.defaultFileList || [], - dragState: 'drop' + dragState: 'drop', }; } @@ -101,7 +101,7 @@ export default class Upload extends React.Component { } this.onChange({ file: targetItem, - fileList: nextFileList + fileList: nextFileList, }); // fix ie progress if (!window.FormData) { @@ -115,7 +115,7 @@ export default class Upload extends React.Component { this.progressTimer = setInterval(() => { curPercent = getPercent(curPercent); this.onProgress({ - percent: curPercent + percent: curPercent, }, file); }, 200); } @@ -146,7 +146,7 @@ export default class Upload extends React.Component { targetItem.response = response; this.onChange({ file: targetItem, - fileList + fileList, }); } } @@ -159,7 +159,7 @@ export default class Upload extends React.Component { this.onChange({ event: e, file: targetItem, - fileList: this.state.fileList + fileList: this.state.fileList, }); } @@ -207,7 +207,7 @@ export default class Upload extends React.Component { onChange = (info) => { this.setState({ - fileList: info.fileList + fileList: info.fileList, }); this.props.onChange(info); } @@ -222,7 +222,7 @@ export default class Upload extends React.Component { onFileDrop = (e) => { this.setState({ - dragState: e.type + dragState: e.type, }); } diff --git a/components/upload/uploadList.jsx b/components/upload/uploadList.jsx index 32f9e5bbd1f2..01c9ee7854a2 100644 --- a/components/upload/uploadList.jsx +++ b/components/upload/uploadList.jsx @@ -20,8 +20,8 @@ export default class UploadList extends React.Component { items: [], progressAttr: { strokeWidth: 3, - showInfo: false - } + showInfo: false, + }, }; handleClose = (file) => { diff --git a/site/component/IconSet/CopyableIcon.jsx b/site/component/IconSet/CopyableIcon.jsx index 8b42e377194e..2e380392c110 100644 --- a/site/component/IconSet/CopyableIcon.jsx +++ b/site/component/IconSet/CopyableIcon.jsx @@ -6,7 +6,7 @@ export default class CopyableIcon extends React.Component { constructor(props) { super(props); this.state = { - justCopied: false + justCopied: false, }; } diff --git a/site/component/IconSet/index.jsx b/site/component/IconSet/index.jsx index 8fbe0fff4fc3..52e966ddcabc 100644 --- a/site/component/IconSet/index.jsx +++ b/site/component/IconSet/index.jsx @@ -4,7 +4,7 @@ import CopyableIcon from './CopyableIcon'; export default class IconSet extends React.Component { static defaultProps = { - icons: [] + icons: [], } render() { diff --git a/site/component/MainContent/index.jsx b/site/component/MainContent/index.jsx index 340b49854164..f1b6dd4656f6 100644 --- a/site/component/MainContent/index.jsx +++ b/site/component/MainContent/index.jsx @@ -47,7 +47,7 @@ export default class MainContent extends React.Component { const text = isTop ? item.chinese || item.english : [ {item.english}, - {item.chinese} + {item.chinese}, ]; const disabled = item.disabled; const url = item.fileName.replace(/(\/index)?\.md$/i, ''); diff --git a/site/component/NotFound/index.jsx b/site/component/NotFound/index.jsx index 1e3e6fc9e3f6..074cc70ddb22 100644 --- a/site/component/NotFound/index.jsx +++ b/site/component/NotFound/index.jsx @@ -10,7 +10,7 @@ export default function NotFound() {

    你要找的页面不存在 返回首页