feat(List): add finished slot

This commit is contained in:
陈嘉涵
2019-12-26 20:14:16 +08:00
committed by neverland
parent 30b3e4b6ba
commit 8a0705d761
5 changed files with 29 additions and 4 deletions
+6 -4
View File
@@ -126,10 +126,12 @@ export default createComponent({
},
genFinishedText() {
if (this.finished && this.finishedText) {
return (
<div class={bem('finished-text')}>{this.finishedText}</div>
);
if (this.finished) {
const text = this.slots('finished') || this.finishedText;
if (text) {
return <div class={bem('finished-text')}>{text}</div>;
}
}
},