fix(Calendar): missing info when selected (#5536)

This commit is contained in:
neverland 2020-01-10 09:59:26 +08:00 committed by GitHub
parent 9452444a7d
commit 3e634e618e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -184,22 +184,24 @@ export default createComponent({
}
};
if (type === 'selected') {
return (
<div style={style} class={bem('day')} onClick={onClick}>
<div class={bem('selected-day')} style={{ background: this.color }}>
{item.text}
</div>
</div>
);
}
const TopInfo = topInfo && <div class={bem('top-info')}>{topInfo}</div>;
const BottomInfo = bottomInfo && (
<div class={bem('bottom-info')}>{bottomInfo}</div>
);
if (type === 'selected') {
return (
<div style={style} class={bem('day')} onClick={onClick}>
<div class={bem('selected-day')} style={{ background: this.color }}>
{TopInfo}
{item.text}
{BottomInfo}
</div>
</div>
);
}
return (
<div
style={style}