【问题标题】:Is it possible to show multiple toastr messages in diferrent positions?是否可以在不同位置显示多个 toast 消息?
【发布时间】:2015-01-03 00:33:18
【问题描述】:
 <script>
    var options1 = { positionClass: 'toast-top-full-width', timeOut: 0};
    toastr.error('Message1', 'Title1', options1);

    var options2 = { positionClass: 'toast-bottom-right', timeOut: 5000}
    toastr.success('Message2', 'Title2', options2);
</script>

成功toast在5s后消失,但不显示在右下角

【问题讨论】:

    标签: toast toastr


    【解决方案1】:

    demo site 在表单设置的更改被识别之前调用 toastr.clear() 并且生成的 toastr 反映了新选项。我建议将此调用合并到您的代码逻辑中。

    【讨论】:

      猜你喜欢
      • 2019-04-28
      • 2021-11-06
      • 2014-07-04
      • 1970-01-01
      • 1970-01-01
      • 2015-02-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多