minor changes made on akaunting-date component and used partials

This commit is contained in:
Sevan Nerse 2021-01-04 18:43:16 +03:00
parent 239a1f282a
commit 7aa0686fb9
4 changed files with 18 additions and 0 deletions

View File

@ -83,12 +83,18 @@ export default {
mounted() {
this.real_model = this.value;
if (this.model) {
this.real_model = this.model;
}
this.$emit('interface', this.real_model);
},
methods: {
change() {
this.$emit('interface', this.real_model);
this.$emit('change', this.real_model);
}
}
}

View File

@ -49,6 +49,10 @@
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event"
@endif
@if (!empty($attributes['change']))
@change="{{ $attributes['change'] }}"
@endif
@if (isset($attributes['required']))
:required="{{ ($attributes['required']) ? 'true' : 'false' }}"
@endif

View File

@ -52,6 +52,10 @@
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event"
@endif
@if (!empty($attributes['change']))
@change="{{ $attributes['change'] }}"
@endif
@if (isset($attributes['readonly']))
:readonly="{{ $attributes['readonly'] }}"
@endif

View File

@ -40,6 +40,10 @@
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event"
@endif
@if (!empty($attributes['change']))
@change="{{ $attributes['change'] }}"
@endif
@if (isset($attributes['readonly']))
:readonly="{{ $attributes['readonly'] }}"
@endif