diff --git a/components/breadcrumb/index.jsx b/components/breadcrumb/index.jsx index 657a477b779ac5ee06040113850e3de734c9c1b7..f5be6064ce7fa9e8ee4b2355ad3ad90ddf5f1067 100644 --- a/components/breadcrumb/index.jsx +++ b/components/breadcrumb/index.jsx @@ -53,11 +53,11 @@ const Breadcrumb = React.createClass({ const ReactRouter = router; if (routes && routes.length > 0 && ReactRouter) { let Link = ReactRouter.Link; - crumbs = routes.map(function(route, i) { + crumbs = routes.map(function (route, i) { if (!route.breadcrumbName) { return null; } - const name = route.breadcrumbName.replace(/\:(.*)/g, function(replacement, key) { + const name = route.breadcrumbName.replace(/\:(.*)/g, function (replacement, key) { return params[key] || replacement; }); let link; diff --git a/components/calendar/index.jsx b/components/calendar/index.jsx index 9e4615ce85e9f785126863ab1e8d6c54f6b63815..e1dd790b14fcd64f021eed82de24c88918104bd0 100644 --- a/components/calendar/index.jsx +++ b/components/calendar/index.jsx @@ -5,9 +5,9 @@ import FullCalendar from 'rc-calendar/lib/FullCalendar'; import { PREFIX_CLS } from './Constants'; import Header from './Header'; -function noop () { return null; } +function noop() { return null; } -function zerofixed (v) { +function zerofixed(v) { if (v < 10) return '0' + v; return v + ''; } diff --git a/components/message/index.jsx b/components/message/index.jsx index d539c69e98460239f8da4c26c04d9a138b22bbcf..4228ff949fe3af080a7665fa7169059143e651a0 100644 --- a/components/message/index.jsx +++ b/components/message/index.jsx @@ -46,9 +46,9 @@ function notice(content, duration = defaultDuration, type, onClose) { , onClose }); - return (function() { + return (function () { let target = key++; - return function() { + return function () { instance.removeNotice(target); }; })(); diff --git a/components/popconfirm/index.jsx b/components/popconfirm/index.jsx index 8af14010bf7dbf006a91c9a2c197116f0c81266e..c16db5945daf323e6e99b6bf4986a0c71424d4a6 100644 --- a/components/popconfirm/index.jsx +++ b/components/popconfirm/index.jsx @@ -4,7 +4,7 @@ import Icon from '../icon'; import Button from '../button'; const prefixCls = 'ant-popover'; -const noop = function() {}; +const noop = function () {}; const transitionNames = { top: 'zoom-down', bottom: 'zoom-up', diff --git a/components/upload/index.jsx b/components/upload/index.jsx index ad376c91766935af39a8779b73bf31c1ea6497ba..c3b380ef2b4c01e70131e2faa6473c9d7c37aa79 100644 --- a/components/upload/index.jsx +++ b/components/upload/index.jsx @@ -37,7 +37,7 @@ function genPercentAdd() { let k = 0.1; const i = 0.01; const end = 0.98; - return function(s) { + return function (s) { let start = s; if (start >= end) { return start; @@ -65,7 +65,7 @@ const AntUpload = React.createClass({ let targetItem; let nextFileList = this.state.fileList.concat(); if (file.length > 0) { - targetItem = file.map(function(f) { + targetItem = file.map(function (f) { const fileObject = fileToObject(f); fileObject.status = 'uploading'; return fileObject; diff --git a/components/upload/uploadList.jsx b/components/upload/uploadList.jsx index 8aa606e2084cb925b0f96213d201dee54d93df31..0a6af8cedba7e7ac2454d8037bf81483e92d5eb1 100644 --- a/components/upload/uploadList.jsx +++ b/components/upload/uploadList.jsx @@ -6,9 +6,9 @@ import { Line } from '../progress'; import classNames from 'classnames'; // https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL -const previewFile = function(file, callback) { +const previewFile = function (file, callback) { const reader = new FileReader(); - reader.onloadend = function() { + reader.onloadend = function () { callback(reader.result); }; reader.readAsDataURL(file);