Added random colour for messages
This commit is contained in:
parent
0946bcc1b1
commit
443925afa1
1 changed files with 4 additions and 2 deletions
|
|
@ -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',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue