diff --git a/src/components/message/Message.vue b/src/components/message/Message.vue index 0b645636a..a6a90452c 100755 --- a/src/components/message/Message.vue +++ b/src/components/message/Message.vue @@ -6,7 +6,7 @@
- @@ -18,6 +18,7 @@ import Ripple from '../ripple/Ripple'; export default { + emits: ['close'], props: { severity: { type: String, @@ -49,6 +50,12 @@ export default { }, this.life); } }, + methods: { + close(event) { + this.visible = false; + this.$emit('close', event); + } + }, computed: { containerClass() { return 'p-message p-component p-message-' + this.severity; diff --git a/src/views/dropdown/DropdownDemo.vue b/src/views/dropdown/DropdownDemo.vue index 6fb313dbe..778f32c68 100755 --- a/src/views/dropdown/DropdownDemo.vue +++ b/src/views/dropdown/DropdownDemo.vue @@ -11,7 +11,7 @@
Basic
- +
Editable
@@ -47,15 +47,15 @@ import DropdownDoc from './DropdownDoc'; export default { data() { return { - selectedCity1: null, + selectedCity1: 0, selectedCity2: null, selectedCountry: null, cities: [ - {name: 'New York', code: 'NY'}, - {name: 'Rome', code: 'RM'}, - {name: 'London', code: 'LDN'}, - {name: 'Istanbul', code: 'IST'}, - {name: 'Paris', code: 'PRS'} + {name: 'New York', code: 1}, + {name: 'Rome', code: 2}, + {name: 'London', code: 0}, + {name: 'Istanbul', code: 4}, + {name: 'Paris', code: 5} ], countries: [ {name: 'Australia', code: 'AU'}, diff --git a/src/views/message/MessageDoc.vue b/src/views/message/MessageDoc.vue index ff7e6c2d4..7a06b44e0 100755 --- a/src/views/message/MessageDoc.vue +++ b/src/views/message/MessageDoc.vue @@ -144,6 +144,26 @@ import InlineMessage from 'primevue/inlinemessage';
+
Events of Message
+
+ + + + + + + + + + + + + + + +
NameParametersDescription
closeevent: Browser eventCallback to invoke when a message is closed.
+
+
Styling

Following is the list of structural style classes, for theming classes visit theming page.