update notification generator

This commit is contained in:
undefined committed 2020-07-14 12:24:05 +08:00
1 parent 900e19382b
commit 95bfd98b43
1 file changed
+2 -3
+2 -3
View File
@@ -22,7 +22,7 @@ export default class Notification {
}
static show({
avatar, title, message, type = 'info', duration = 3000,
avatar, title, message, type, duration = 3000,
actionButtons = [],
}) {
if (duration && lastNotification) {
@@ -33,9 +33,8 @@ export default class Notification {
if (title) $(tpl`${title} `).appendTo($dom);
$(tpl`${message}`).appendTo($dom);
actionButtons.forEach((button) => {
$(tpl`<button class="${button.class}">${button.name}</button>`).appendTo($dom);
$(tpl`<button class="${button.class}" onclick="javascript:window.${button.funcName}();">${button.name}</button>`).appendTo($dom);
});
console.log($dom);
const $n = $dom
.css('z-index', zIndexManager.getNext())
.appendTo('body');