Tab.vue 567 B

1234567891011121314151617181920212223242526272829303132
  1. <template>
  2. <div v-show="active">
  3. <slot></slot>
  4. </div>
  5. </template>
  6. <script>
  7. import { defineComponent } from "@nuxtjs/composition-api"
  8. export default defineComponent({
  9. props: {
  10. label: { type: String, default: null },
  11. info: { type: String, default: null },
  12. icon: { type: String, default: null },
  13. id: { type: String, default: null, required: true },
  14. selected: {
  15. type: Boolean,
  16. default: false,
  17. },
  18. },
  19. data() {
  20. return {
  21. active: false,
  22. }
  23. },
  24. mounted() {
  25. this.active = this.selected
  26. },
  27. })
  28. </script>