Fix some v-if syntax

This commit is contained in:
Bubka 2022-07-21 18:25:04 +02:00
parent a066be8e38
commit b0d263091d
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@
<div class="field" :class="{ 'pt-3' : hasOffset }"> <div class="field" :class="{ 'pt-3' : hasOffset }">
<label class="label" v-html="label"></label> <label class="label" v-html="label"></label>
<div class="is-toggle buttons"> <div class="is-toggle buttons">
<label class="button is-dark" :disabled="isDisabled" v-for="choice in choices" :class="{ 'is-link' : form[fieldName] === choice.value }"> <label class="button is-dark" :disabled="isDisabled" v-for="(choice, index) in choices" :key="index" :class="{ 'is-link' : form[fieldName] === choice.value }">
<input type="radio" class="is-hidden" :checked="form[fieldName] === choice.value" :value="choice.value" v-model="form[fieldName]" v-on:change="$emit(fieldName, form[fieldName])" :disabled="isDisabled" /> <input type="radio" class="is-hidden" :checked="form[fieldName] === choice.value" :value="choice.value" v-model="form[fieldName]" v-on:change="$emit(fieldName, form[fieldName])" :disabled="isDisabled" />
<font-awesome-icon :icon="['fas', choice.icon]" v-if="choice.icon" class="mr-3" /> {{ choice.text }} <font-awesome-icon :icon="['fas', choice.icon]" v-if="choice.icon" class="mr-3" /> {{ choice.text }}
</label> </label>

View File

@ -16,9 +16,9 @@
</div> </div>
<div class="columns is-mobile" v-if="form.errors.any()"> <div class="columns is-mobile" v-if="form.errors.any()">
<div class="column"> <div class="column">
<p v-for="field in form.errors.errors" class="help is-danger"> <p v-for="(field, index) in form.errors.errors" :key="index" class="help is-danger">
<ul> <ul>
<li v-for="(error, index) in field">{{ error }}</li> <li v-for="(error, index) in field" :key="index">{{ error }}</li>
</ul> </ul>
</p> </p>
</div> </div>
@ -103,7 +103,7 @@
<p class="control"> <p class="control">
<span class="select"> <span class="select">
<select @change="form.secret=''" v-model="secretIsBase32Encoded"> <select @change="form.secret=''" v-model="secretIsBase32Encoded">
<option v-for="format in secretFormats" :value="format.value">{{ format.text }}</option> <option v-for="(format, index) in secretFormats" :key="index" :value="format.value">{{ format.text }}</option>
</select> </select>
</span> </span>
</p> </p>