From 930d8b602e2f1101aa7717d4c5f22703f7c8c740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Poussard?= <tpoussard@neogeo.fr> Date: Tue, 7 Sep 2021 17:22:42 +0200 Subject: [PATCH] prevent error in feature_detail special field --- src/views/feature/Feature_detail.vue | 58 +++++++++++++++------------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/src/views/feature/Feature_detail.vue b/src/views/feature/Feature_detail.vue index 2f1ae36a..a56f8b38 100644 --- a/src/views/feature/Feature_detail.vue +++ b/src/views/feature/Feature_detail.vue @@ -51,31 +51,37 @@ <div class="row"> <div class="seven wide column"> <table class="ui very basic table"> - <tbody>test - <tr v-for="field in feature.feature_data" :key="field.label"> - <td> - <b>{{ field.label }}</b> - </td> - <td> - <b> - <i - v-if=" - field.field_type === 'boolean' && field.value === true - " - class="olive check icon" - ></i> - <i - v-else-if=" - field.field_type === 'boolean' && field.value === false - " - class="red times icon" - ></i> - <span v-else> - {{ field.value }} - </span> - </b> - </td> - </tr> + <tbody> + <div + v-frag + v-for="(field, index) in feature.feature_data" + :key="'field' + index" + > + <tr v-if="field"> + <td> + <b>{{ field.label }}</b> + </td> + <td> + <b> + <i + v-if=" + field.field_type === 'boolean' && field.value === true + " + class="olive check icon" + ></i> + <i + v-else-if=" + field.field_type === 'boolean' && field.value === false + " + class="red times icon" + ></i> + <span v-else> + {{ field.value }} + </span> + </b> + </td> + </tr> + </div> <tr> <td>Auteur</td> <td>{{ feature.display_creator }}</td> @@ -300,7 +306,7 @@ : "Sélectionner un fichier ..." }}</span> </label> - <!-- // todo : get image from "C:\\fakepath\..." --> + <!-- // todo : get image from "C:\\fakepath\..." --> <input type="file" accept="application/pdf, image/jpeg, image/png" -- GitLab