diff options
| author | Henry Jameson <me@hjkos.com> | 2019-07-05 10:17:44 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2019-07-05 10:17:44 +0300 |
| commit | 8d6750d9c2816e33a0444cd978f94009d8b85d47 (patch) | |
| tree | 853082e4c341cb4d8dd8dfdee3234215d3d9799d /src/components/export_import | |
| parent | 2c2b84d31dbe906b89dfb995394d887af110e04c (diff) | |
eslint --fix --ext .js,.vue src
Diffstat (limited to 'src/components/export_import')
| -rw-r--r-- | src/components/export_import/export_import.vue | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/src/components/export_import/export_import.vue b/src/components/export_import/export_import.vue index 451a2668..20c6f569 100644 --- a/src/components/export_import/export_import.vue +++ b/src/components/export_import/export_import.vue @@ -1,12 +1,27 @@ <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> @@ -49,7 +64,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) |
