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() { render() {
if (!this.shouldRender) {
return;
}
return ( return (
<transition name={this.transition} onAfterLeave={this.onClosed}> <transition name={this.transition} onAfterLeave={this.onClosed}>
{this.shouldRender ? (
<div vShow={this.value} class={[bem(), this.className]}> <div vShow={this.value} class={[bem(), this.className]}>
{this.genClose()} {this.genClose()}
{this.genImages()} {this.genImages()}
{this.genIndex()} {this.genIndex()}
{this.genCover()} {this.genCover()}
</div> </div>
) : null}
</transition> </transition>
); );
}, },