diff options
Diffstat (limited to 'src/components/export_import')
| -rw-r--r-- | src/components/export_import/export_import.vue | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/src/components/export_import/export_import.vue b/src/components/export_import/export_import.vue index 20c6f569..451a2668 100644 --- a/src/components/export_import/export_import.vue +++ b/src/components/export_import/export_import.vue @@ -1,27 +1,12 @@ <template> - <div class="import-export-container"> - <slot name="before" /> - <button - class="btn" - @click="exportData" - > - {{ exportLabel }} - </button> - <button - class="btn" - @click="importData" - > - {{ importLabel }} - </button> - <slot name="afterButtons" /> - <p - v-if="importFailed" - class="alert error" - > - {{ importFailedText }} - </p> - <slot name="afterError" /> - </div> +<div class="import-export-container"> + <slot name="before"/> + <button class="btn" @click="exportData">{{ exportLabel }}</button> + <button class="btn" @click="importData">{{ importLabel }}</button> + <slot name="afterButtons"/> + <p v-if="importFailed" class="alert error">{{ importFailedText }}</p> + <slot name="afterError"/> +</div> </template> <script> @@ -64,7 +49,7 @@ export default { if (event.target.files[0]) { // eslint-disable-next-line no-undef const reader = new FileReader() - reader.onload = ({ target }) => { + reader.onload = ({target}) => { try { const parsed = JSON.parse(target.result) const valid = this.validator(parsed) |
