chore: prettier js codes

This commit is contained in:
陈嘉涵
2020-01-19 17:02:01 +08:00
parent 2adcfd8b8b
commit 1e864a445f
28 changed files with 333 additions and 174 deletions

View File

@@ -85,10 +85,16 @@ export default createComponent({
genIcon() {
const { icon, type, iconPrefix, loadingType } = this;
const hasIcon = icon || (type === 'success' || type === 'fail');
const hasIcon = icon || type === 'success' || type === 'fail';
if (hasIcon) {
return <Icon class={bem('icon')} classPrefix={iconPrefix} name={icon || type} />;
return (
<Icon
class={bem('icon')}
classPrefix={iconPrefix}
name={icon || type}
/>
);
}
if (type === 'loading') {
@@ -120,7 +126,10 @@ export default createComponent({
>
<div
vShow={this.value}
class={[bem([this.position, { [this.type]: !this.icon }]), this.className]}
class={[
bem([this.position, { [this.type]: !this.icon }]),
this.className,
]}
onClick={this.onClick}
>
{this.genIcon()}