style: prettier code

pull/3067/head
tanjinzhou 4 years ago
parent 789647c604
commit d96a10dce8

@ -33,7 +33,10 @@
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": true }]
"@typescript-eslint/no-unused-vars": [
"error",
{ "vars": "all", "args": "after-used", "ignoreRestSiblings": true }
]
}
}
],

@ -1 +1 @@
Subproject commit 4f6ebd03190812369678c4dd383fdb4e98d6f6c1
Subproject commit 68644e7953c739fe64bfbe458f158fcd1d924872

@ -37,16 +37,12 @@ describe('Select', () => {
attachTo: 'body',
});
await asyncExpect(() => {
wrapper
.findAll('.ant-select-selector')[0]
.element.dispatchEvent(new MouseEvent('mousedown'));
wrapper.findAll('.ant-select-selector')[0].element.dispatchEvent(new MouseEvent('mousedown'));
});
await asyncExpect(() => {
expect($$('.ant-select-item-option').length).toBe(0);
expect($$('.ant-empty-description')[0].innerHTML).toBe(
'No Data',
);
expect($$('.ant-empty-description')[0].innerHTML).toBe('No Data');
}, 100);
});
@ -60,9 +56,7 @@ describe('Select', () => {
attachTo: 'body',
});
await asyncExpect(() => {
wrapper
.findAll('.ant-select-selector')[0]
.element.dispatchEvent(new MouseEvent('mousedown'));
wrapper.findAll('.ant-select-selector')[0].element.dispatchEvent(new MouseEvent('mousedown'));
});
await asyncExpect(() => {
@ -79,9 +73,7 @@ describe('Select', () => {
attachTo: 'body',
});
await asyncExpect(() => {
wrapper
.findAll('.ant-select-selector')[0]
.element.dispatchEvent(new MouseEvent('mousedown'));
wrapper.findAll('.ant-select-selector')[0].element.dispatchEvent(new MouseEvent('mousedown'));
});
await asyncExpect(() => {
@ -98,9 +90,7 @@ describe('Select', () => {
sync: false,
});
await asyncExpect(() => {
wrapper
.findAll('.ant-select-selector')[0]
.element.dispatchEvent(new MouseEvent('mousedown'));
wrapper.findAll('.ant-select-selector')[0].element.dispatchEvent(new MouseEvent('mousedown'));
});
await asyncExpect(() => {
@ -135,11 +125,9 @@ describe('Select', () => {
expect(getStyle($$('.ant-select-dropdown')[0], 'display')).toBe('block');
}, 100);
await asyncExpect(() => {
wrapper
.findAll('.ant-select-selector')[0]
.element.dispatchEvent(new MouseEvent('mousedown'));
wrapper.findAll('.ant-select-selector')[0].element.dispatchEvent(new MouseEvent('mousedown'));
});
await asyncExpect(()=>{
await asyncExpect(() => {
expect(onDropdownVisibleChange).toHaveBeenLastCalledWith(false);
});
await asyncExpect(() => {
@ -149,9 +137,7 @@ describe('Select', () => {
await asyncExpect(() => {
expect(getStyle($$('.ant-select-dropdown')[0], 'display')).toBe('none');
wrapper
.findAll('.ant-select-selector')[0]
.element.dispatchEvent(new MouseEvent('mousedown'));
wrapper.findAll('.ant-select-selector')[0].element.dispatchEvent(new MouseEvent('mousedown'));
expect(onDropdownVisibleChange).toHaveBeenLastCalledWith(true);
expect(getStyle($$('.ant-select-dropdown')[0], 'display')).toBe('none');
}, 500);

@ -104,7 +104,14 @@ export default function() {
}
const clearIcon = getComponent(this, 'clearIcon');
return (
<span key="clear" unselectable="on" aria-hidden="true" style="user-select: none;" class={`${prefixCls}-clear`} onClick={onSelectorClear}>
<span
key="clear"
unselectable="on"
aria-hidden="true"
style="user-select: none;"
class={`${prefixCls}-clear`}
onClick={onSelectorClear}
>
{clearIcon}
</span>
);
@ -117,7 +124,11 @@ export default function() {
}
const inputIcon = getComponent(this, 'inputIcon');
return (
<span key="arrow" class={`${prefixCls}-arrow`} style={{ outline: 'none', userSelect: 'none' }}>
<span
key="arrow"
class={`${prefixCls}-arrow`}
style={{ outline: 'none', userSelect: 'none' }}
>
{inputIcon}
</span>
);

@ -81,11 +81,7 @@ const MultipleSelector = {
this.__emit('choiceAnimationLeave', ...args);
},
renderSelection() {
const {
selectorValueList,
labelInValue,
maxTagCount,
} = this.$props;
const { selectorValueList, labelInValue, maxTagCount } = this.$props;
const children = getSlot(this);
const {
vcTreeSelect: { onMultipleSelectorRemove },
@ -140,14 +136,9 @@ const MultipleSelector = {
}
selectedValueNodes.push(
<SearchInput
key="SearchInput"
{...this.$props}
{...this.$attrs}
ref={this.inputRef}
>
{children}
</SearchInput>,
<SearchInput key="SearchInput" {...this.$props} {...this.$attrs} ref={this.inputRef}>
{children}
</SearchInput>,
);
return selectedValueNodes;

Loading…
Cancel
Save