gpt4 book ai didi

javascript - 为什么 PNotify 选项 `after_open` 不起作用?

转载 作者:行者123 更新时间:2023-12-03 02:11:36 24 4
gpt4 key购买 nike

我找到了similar question

但是属性 after_open 不起作用

我使用webpacknpmpnotify package与下一个代码:

entry.js

'use strict';

let PNotify = require('pnotify');

PNotify.prototype.options.styling = 'bootstrap3';

(new PNotify({
//...
after_open(ui) {console.log('after_open');},
//...
}));

显示通知,但没有 after_open

问题出在哪里?

最佳答案

要使用回调,需要包含(额外的pnotify模块)

'use strict';

let PNotify = require('pnotify');
require('pnotify/dist/pnotify.callbacks.js');

/* next code */

关于javascript - 为什么 PNotify 选项 `after_open` 不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49540534/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com