Tab.vue 637 B

12345678910111213141516171819202122232425262728293031323334
  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. name: "SmartTab",
  10. props: {
  11. label: { type: String, default: null },
  12. info: { type: String, default: null },
  13. indicator: { type: Boolean, default: false },
  14. icon: { type: String, default: null },
  15. id: { type: String, default: null, required: true },
  16. selected: {
  17. type: Boolean,
  18. default: false,
  19. },
  20. },
  21. data() {
  22. return {
  23. active: false,
  24. }
  25. },
  26. mounted() {
  27. this.active = this.selected
  28. },
  29. })
  30. </script>