AngularJS Toastr fadeIn fadeOut

AngularJS Toastr fadeIn fadeOut

本文关键字:fadeOut fadeIn Toastr AngularJS      更新时间:2023-09-26

我有一个服务代码,如 ;

<script>
var pop = function (type, message, callbackfn,duration) {
        toaster.pop({
            type: type,
            body: message,
            showCloseButton: true,
            timeout: duration,
            positionClass: "toast-top-full-width",
            onHideCallback: callbackfn,
            hideDuration : 1000,
            hideMethod: 'slideUp'
        });
</script>

但我的烤面包机没有淡入或淡出。我的 AngularJS toastr 版本是:0.4.15 我应该在弹出方法中添加哪个选项来获得淡出功能?

我不熟悉 Angular 端口,但原版可以在这里播放.这表明您关注的属性是:

  • "显示方法":"淡入"
  • "隐藏方法":"淡出"
  • "显示持续时间":"300"
  • "隐藏持续时间":"3000"
  • "超时":"2000"

    1. 你的吐司有没有显示?

    2. 是否已确认在调用时填充了类型、消息和持续时间变量?