-1

我正在使用 noty https://ned.im/noty/

这是我的代码:

<script>
function showNoty() {
var n = new Noty({
        text: "<?php echo $message; ?>",
        type: "error", 
        layout: "top",
        theme:"sunset",
        container: "#content",
        closeWith:[]
    });
    n.show();
}
showNoty();
</script>

问题:

一切正常,直到第 6 次单击按钮显示消息。所以,我可以点击 5 次并正确显示消息,在 +6 次点击时不再起作用。

有人可以给一些提示吗?谢谢!

4

1 回答 1

0

我需要使用静态方法(https://ned.im/noty/#/api?id=api-static-methods

我解决了这个问题:

Noty.setMaxVisible(10);

谢谢你们!

于 2018-09-07T13:59:23.003 回答