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
+13 -4
View File
@@ -87,6 +87,18 @@ export default createComponent({
}
},
getText() {
const textSlot = this.slots('text');
if (textSlot) {
return textSlot;
}
if (this.text) {
return <span class={bem('text')}>{this.text}</span>;
}
},
genContent() {
const slot = this.slots();
@@ -94,10 +106,7 @@ export default createComponent({
return slot;
}
return [
this.genIcon(),
this.slots('text') || (this.text && <span class={bem('text')}>{this.text}</span>),
];
return [this.genIcon(), this.getText()];
},
},