From d51f08870d8818a73c1ac91808414d5abb40d171 Mon Sep 17 00:00:00 2001 From: Alexandre Mouillard Date: Fri, 14 Apr 2017 16:14:14 +0200 Subject: [PATCH] Notification: add onClick handler --- packages/notification/src/main.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/notification/src/main.vue b/packages/notification/src/main.vue index b760331de..cce71d9e8 100644 --- a/packages/notification/src/main.vue +++ b/packages/notification/src/main.vue @@ -6,7 +6,8 @@ v-show="visible" :style="{ top: top ? top + 'px' : 'auto' }" @mouseenter="clearTimer()" - @mouseleave="startTimer()"> + @mouseleave="startTimer()" + @click="click">

{{ message }}
-
+
@@ -40,6 +41,7 @@ customClass: '', iconClass: '', onClose: null, + onClick: null, closed: false, top: null, timer: null @@ -68,6 +70,12 @@ this.$el.parentNode.removeChild(this.$el); }, + click() { + if (typeof this.onClick === 'function') { + this.onClick(); + } + }, + close() { this.closed = true; if (typeof this.onClose === 'function') {