Skip to content

Commit 76d8491

Browse files
committed
style: fix code format
1 parent f547171 commit 76d8491

File tree

68 files changed

+394
-334
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+394
-334
lines changed

components/anchor/Anchor.jsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,15 @@ export default {
212212
},
213213

214214
render() {
215-
const { prefixCls: customizePrefixCls, offsetTop, affix, showInkInFixed, activeLink, $slots, getContainer } = this;
215+
const {
216+
prefixCls: customizePrefixCls,
217+
offsetTop,
218+
affix,
219+
showInkInFixed,
220+
activeLink,
221+
$slots,
222+
getContainer,
223+
} = this;
216224

217225
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
218226
const prefixCls = getPrefixCls('anchor', customizePrefixCls);

components/auto-complete/index.jsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,14 @@ const AutoComplete = {
8181
},
8282

8383
render() {
84-
const { size, prefixCls: customizePrefixCls, optionLabelProp, dataSource, $slots, $listeners } = this;
84+
const {
85+
size,
86+
prefixCls: customizePrefixCls,
87+
optionLabelProp,
88+
dataSource,
89+
$slots,
90+
$listeners,
91+
} = this;
8592

8693
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
8794
const prefixCls = getPrefixCls('select', customizePrefixCls);

components/avatar/__tests__/Avatar.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('Avatar Render', () => {
4444
global.document.body.innerHTML = '';
4545
}, 0);
4646
});
47-
it('should handle onError correctly', async() => {
47+
it('should handle onError correctly', async () => {
4848
global.document.body.innerHTML = '';
4949
const LOAD_FAILURE_SRC = 'http://error.url';
5050
const LOAD_SUCCESS_SRC = 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png';
@@ -68,7 +68,7 @@ describe('Avatar Render', () => {
6868
},
6969
};
7070

71-
const wrapper = mount(Foo, { sync: false, attachToDocument: true },);
71+
const wrapper = mount(Foo, { sync: false, attachToDocument: true });
7272
await asyncExpect(() => {
7373
// mock img load Error, since jsdom do not load resource by default
7474
// https://github.com/jsdom/jsdom/issues/1816
@@ -82,7 +82,7 @@ describe('Avatar Render', () => {
8282
}, 0);
8383
});
8484

85-
it('should show image on success after a failure state', async() => {
85+
it('should show image on success after a failure state', async () => {
8686
global.document.body.innerHTML = '';
8787
const LOAD_FAILURE_SRC = 'http://error.url';
8888
const LOAD_SUCCESS_SRC = 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png';

components/badge/ScrollNumber.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ export default {
118118
const { sCount } = this;
119119
if (sCount && Number(sCount) % 1 === 0) {
120120
return getNumberArray(sCount)
121-
.map((num, i) => this.renderCurrentNumber(prefixCls, num, i))
122-
.reverse();
121+
.map((num, i) => this.renderCurrentNumber(prefixCls, num, i))
122+
.reverse();
123123
}
124124
return sCount;
125125
},

components/button/button.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ export default {
151151
const iconNode = iconType ? <Icon type={iconType} /> : null;
152152
const children = filterEmpty($slots.default);
153153
const autoInsertSpace = this.configProvider.autoInsertSpaceInButton !== false;
154-
const kids = children.map(child => this.insertSpace(child, this.isNeedInserted() && autoInsertSpace));
154+
const kids = children.map(child =>
155+
this.insertSpace(child, this.isNeedInserted() && autoInsertSpace),
156+
);
155157

156158
if ($attrs.href !== undefined) {
157159
return (

components/calendar/Header.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export default {
135135
},
136136

137137
render() {
138-
const { prefixCls: customizePrefixCls,type, value, locale, fullscreen } = this;
138+
const { prefixCls: customizePrefixCls, type, value, locale, fullscreen } = this;
139139
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
140140
const prefixCls = getPrefixCls('fullcalendar', customizePrefixCls);
141141

components/calendar/index.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,12 @@ const Calendar = {
167167
if (value && localeCode) {
168168
value.locale(localeCode);
169169
}
170-
const { prefixCls: customizePrefixCls, fullscreen, dateFullCellRender, monthFullCellRender } = props;
170+
const {
171+
prefixCls: customizePrefixCls,
172+
fullscreen,
173+
dateFullCellRender,
174+
monthFullCellRender,
175+
} = props;
171176
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
172177
const prefixCls = getPrefixCls('fullcalendar', customizePrefixCls);
173178
const type = mode === 'year' ? 'month' : 'date';

components/carousel/index.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ const Carousel = {
136136
props.fade = true;
137137
}
138138

139-
140139
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
141140
let className = getPrefixCls('carousel', props.prefixCls);
142141

components/cascader/index.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,10 +380,9 @@ const Cascader = {
380380
...otherProps
381381
} = props;
382382
const getPrefixCls = this.configProvider.getPrefixCls || ConfigConsumerProps.getPrefixCls;
383-
const renderEmpty = (
384-
this.configProvider.renderEmpty &&
385-
this.configProvider.renderEmpty()
386-
) || ConfigConsumerProps.renderEmpty;
383+
const renderEmpty =
384+
(this.configProvider.renderEmpty && this.configProvider.renderEmpty()) ||
385+
ConfigConsumerProps.renderEmpty;
387386
const prefixCls = getPrefixCls('cascader', customizePrefixCls);
388387
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
389388

components/collapse/Collapse.jsx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import animation from '../_util/openAnimation';
2-
import { getOptionProps, initDefaultProps, getComponentFromProp, isValidElement } from '../_util/props-util';
2+
import {
3+
getOptionProps,
4+
initDefaultProps,
5+
getComponentFromProp,
6+
isValidElement,
7+
} from '../_util/props-util';
38
import { cloneElement } from '../_util/vnode';
49
import VcCollapse, { collapseProps } from '../vc-collapse';
510
import Icon from '../icon';
@@ -22,12 +27,14 @@ export default {
2227
methods: {
2328
renderExpandIcon(panelProps, prefixCls) {
2429
const expandIcon = getComponentFromProp(this, 'expandIcon', panelProps);
25-
const icon = expandIcon || <Icon type="right" rotate={panelProps.isActive ? 90 : undefined} />;
30+
const icon = expandIcon || (
31+
<Icon type="right" rotate={panelProps.isActive ? 90 : undefined} />
32+
);
2633
return isValidElement(expandIcon ? icon[0] : icon)
27-
? cloneElement(icon, {
28-
class: `${prefixCls}-arrow`,
29-
})
30-
: icon;
34+
? cloneElement(icon, {
35+
class: `${prefixCls}-arrow`,
36+
})
37+
: icon;
3138
},
3239
},
3340
render() {
@@ -42,7 +49,7 @@ export default {
4249
props: {
4350
...getOptionProps(this),
4451
prefixCls,
45-
expandIcon: (panelProps) => this.renderExpandIcon(panelProps, prefixCls),
52+
expandIcon: panelProps => this.renderExpandIcon(panelProps, prefixCls),
4653
},
4754
class: collapseClassName,
4855
on: $listeners,

0 commit comments

Comments
 (0)