fix(ImagePreview): missing initial animation (#8274)

This commit is contained in:
neverland 2021-03-04 20:00:49 +08:00 committed by GitHub
parent cf13e6e6a0
commit 25c1c9d646
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -215,18 +215,16 @@ export default createComponent({
},
render() {
if (!this.shouldRender) {
return;
}
return (
<transition name={this.transition} onAfterLeave={this.onClosed}>
<div vShow={this.value} class={[bem(), this.className]}>
{this.genClose()}
{this.genImages()}
{this.genIndex()}
{this.genCover()}
</div>
{this.shouldRender ? (
<div vShow={this.value} class={[bem(), this.className]}>
{this.genClose()}
{this.genImages()}
{this.genIndex()}
{this.genCover()}
</div>
) : null}
</transition>
);
},