Added random colour for messages

This commit is contained in:
Ben Arc
2021-04-20 08:54:45 +01:00
parent 0946bcc1b1
commit 443925afa1

View File

@@ -89,13 +89,15 @@
data() { data() {
return { return {
price: '', price: '',
counter: 1 counter: 1,
colours: ['teal', 'purple', 'indigo', 'pink', 'green']
} }
}, },
methods: { methods: {
showNotif: function (userMessage) { showNotif: function (userMessage) {
var colour = colours[Math.floor(Math.random() * colours.length)]
this.$q.notify({ this.$q.notify({
color: 'purple', color: colour,
html: true, html: true,
message: '<h4 style="color: white;">' + userMessage + '</h4>', message: '<h4 style="color: white;">' + userMessage + '</h4>',
position: 'left', position: 'left',