我从mdbootstrap网站下载了mdbvue演示项目,发现模态组件中的enter和afterenter事件不起作用。为了检查这个,我修改了由事件调用的方法
<template>
<transition name="fade"
@enter="enter"
@after-enter="afterEnter"
@before-leave="beforeLeave"
@after-leave="afterLeave"
>
<component :is="tag" :class="wrapperClass" @click.self="away">
<div :class="dialogClass" role="document" >
<div :class="contentClass" :style="computedContentStyle">
<slot></slot>
</div>
</div>
</component>
</transition>
</template>
enter(el) {
el.style.opacity = 0;
alert();
el.childNodes[0].style.transform = this.dialogTransform;
},
但是模式打开时没有任何警报。但“提前离开”事件中的“提醒”非常有效。
beforeLeave(el) {
el.style.opacity = 0;
alert();
el.childNodes[0].style.transform = this.dialogTransform;
},
主要的问题是,对于modals没有任何显示动画。
最佳答案
我刚刚下载了最新版本的mdbvue,发布了demo应用程序,所有的模式都运行良好。我还向所有事件添加了警报以检查动画。你能在这里写下你使用什么系统和浏览器吗?
最好的!
关于vue.js - MDBootstrap vue.js模式转换不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55304646/