Code refactoring
This commit is contained in:
@ -12,7 +12,7 @@
|
||||
:disabled="disabled"
|
||||
>
|
||||
<flat-picker slot-scope="{focus, blur}"
|
||||
:name="title"
|
||||
:name="dataName"
|
||||
@on-open="focus"
|
||||
@on-close="blur"
|
||||
:config="dateConfig"
|
||||
@ -42,6 +42,11 @@ export default {
|
||||
default: '',
|
||||
description: "Modal header title"
|
||||
},
|
||||
dataName: {
|
||||
type: String,
|
||||
default: '',
|
||||
description: "Modal header title"
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '',
|
||||
@ -93,7 +98,7 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
real_model: this.model,
|
||||
real_model: '',
|
||||
}
|
||||
},
|
||||
|
||||
@ -121,6 +126,13 @@ export default {
|
||||
|
||||
this.$emit('change', this.real_model);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
real_model: function(val) {
|
||||
this.real_model = val;
|
||||
|
||||
this.$emit('interface', this.real_model);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user