Answer the question
In order to leave comments, you need to log in
How to display a server error in a component?
<template>
<b-form @submit.prevent="submitForm()">...</b-form>
<span :v-if='error'>{{ error.message }}</span>
</template>
<script>
export default {
data () {
return {
error: ''
}
},
methods: {
async submitForm () {
try {} catch (err) {
this.error = err;
}
}
}
}
</script>
Answer the question
In order to leave comments, you need to log in
Because the last one is a div.
In general, according to the rules, only li can be in ul. The validator on the div swears.
https://validator.w3.org/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question