fix select defaut value
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user