mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 06:03:38 +08:00
style: update code style to please lint
This commit is contained in:
parent
dde03eaec4
commit
41ed04e977
@ -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;
|
||||
|
@ -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 + '';
|
||||
}
|
||||
|
@ -46,9 +46,9 @@ function notice(content, duration = defaultDuration, type, onClose) {
|
||||
</div>,
|
||||
onClose
|
||||
});
|
||||
return (function() {
|
||||
return (function () {
|
||||
let target = key++;
|
||||
return function() {
|
||||
return function () {
|
||||
instance.removeNotice(target);
|
||||
};
|
||||
})();
|
||||
|
@ -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',
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user