form validation

This commit is contained in:
les
2020-10-09 00:40:36 +02:00
parent 3a7045e958
commit 55dc023019
4 changed files with 16 additions and 14 deletions

View File

@@ -18,7 +18,7 @@ export default {
data () {
return {
icon: 'md-alert',
color: 'primary',
color: 'secondary',
bottom: true,
top: false,
left: false,
@@ -29,10 +29,10 @@ export default {
}
},
created () {
this.$root.$message = (message, opts) => {
this.$root.$message = (message, opts = {}) => {
this.active = true
this.message = this.$t(message, opts)
this.color = opts.color || 'primary'
this.color = opts.color || 'secondary'
this.icon = opts.icon || 'md-alert'
}
}