-
-
-
-
+
+
{{ message.summary }}
{{ message.detail }}
-
+ {{ message.closable }}
@@ -38,17 +34,29 @@ export default {
type: null,
default: null
},
- template: {
- type: null,
+ templates: {
+ type: Object,
default: null
},
closeIcon: {
type: String,
- default: undefined
+ default: null
},
- icon: {
+ infoIcon: {
type: String,
- default: undefined
+ default: null
+ },
+ warnIcon: {
+ type: String,
+ default: null
+ },
+ errorIcon: {
+ type: String,
+ default: null
+ },
+ successIcon: {
+ type: String,
+ default: null
},
closeButtonProps: {
type: null,
@@ -96,22 +104,32 @@ export default {
},
iconComponent() {
return {
- info: InfoCircleIcon,
- success: CheckIcon,
- warn: ExclamationTriangleIcon,
- error: TimesCircleIcon
+ info: !this.infoIcon && InfoCircleIcon,
+ success: !this.successIcon && CheckIcon,
+ warn: !this.warnIcon && ExclamationTriangleIcon,
+ error: !this.errorIcon && TimesCircleIcon
}[this.message.severity];
},
+ iconClass() {
+ return [
+ {
+ [this.infoIcon]: this.message.severity === 'info',
+ [this.warnIcon]: this.message.severity === 'warn',
+ [this.errorIcon]: this.message.severity === 'error',
+ [this.successIcon]: this.message.severity === 'success'
+ }
+ ];
+ },
closeAriaLabel() {
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;
}
},
components: {
- TimesIcon,
- InfoCircleIcon,
- CheckIcon,
- ExclamationTriangleIcon,
- TimesCircleIcon
+ TimesIcon: TimesIcon,
+ InfoCircleIcon: InfoCircleIcon,
+ CheckIcon: CheckIcon,
+ ExclamationTriangleIcon: ExclamationTriangleIcon,
+ TimesCircleIcon: TimesCircleIcon
},
directives: {
ripple: Ripple