FormWrapper.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <div class="columns is-centered">
  3. <div class="form-column column is-two-thirds-tablet is-half-desktop is-one-third-widescreen is-one-quarter-fullhd">
  4. <h1 class="title" v-html="title"></h1>
  5. <slot />
  6. <p v-if="showTag">
  7. <span class="tag is-danger" v-if="fail" v-html="fail" />
  8. <span class="tag is-success" v-if="success" v-html="success" />
  9. </p>
  10. </div>
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. name: 'FormWrapper',
  16. data() {
  17. return {
  18. }
  19. },
  20. computed: {
  21. showTag: function() {
  22. return (this.fail || this.success) ? true : false
  23. }
  24. },
  25. props: {
  26. title: {
  27. type: String,
  28. default: ''
  29. },
  30. fail: {
  31. type: String,
  32. default: ''
  33. },
  34. success: {
  35. type: String,
  36. default: ''
  37. },
  38. }
  39. }
  40. </script>