fix select defaut value

This commit is contained in:
2020-09-12 08:52:20 +02:00
parent e91671a78f
commit 68cbc950f5
9 changed files with 41 additions and 33 deletions

View File

@@ -19,12 +19,11 @@ export default {
type: String,
required: true,
},
date: Date,
time: String,
required: {
type: Boolean,
default: false
},
selected: String,
errors: Object,
},
data: function () {
@@ -37,6 +36,12 @@ export default {
computed: {
hasError: function () {
return this.required && this.errors && this.errors[this.name] && this.errors[this.name].length > 0
},
date: function () {
return this.selected.split(' ')[0]
},
time: function () {
return this.selected.split(' ')[1]
}
},
methods: {