【发布时间】:2019-01-07 14:24:58
【问题描述】:
使用toastr 让我的 FCM 弹出窗口出现在屏幕上。通知有不同的类型(成功、信息等) - 我将如何定位我当前正在触发的特定元素?
这是我的代码:
// Handle incoming messages
messaging.onMessage(function(payload) {
console.log("Notification received: ", payload);
toastr["success"](payload.notification.body, payload.notification.title, {
"closeButton": true,
"debug": false,
"newestOnTop": false,
"progressBar": true,
"positionClass": "toast-top-left",
"preventDuplicates": false,
"showDuration": 30000,
"hideDuration": 1000,
"timeOut": 0,
"extendedTimeOut": 0,
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
});
});
【问题讨论】:
标签: toastr