ErrorList.vue 406 B

1234567891011121314151617181920
  1. <template>
  2. <ul class="list-unstyled">
  3. <li class="text-danger" v-for="error in errorList" :key="error"> {{ error }} </li>
  4. </ul>
  5. </template>
  6. <script>
  7. export default {
  8. props: ['errors'],
  9. data() {
  10. return {
  11. errorList: this.errors,
  12. }
  13. },
  14. watch: {
  15. errors: function (newErrors) {
  16. this.errorList = newErrors;
  17. }
  18. }
  19. }
  20. </script>