api-client/components/smart/Tab.vue

31 lines
491 B
Vue
Raw Normal View History

2020-03-07 13:10:37 +00:00
<template>
2021-07-07 23:28:42 +00:00
<div v-show="active">
2020-03-07 13:10:37 +00:00
<slot></slot>
</div>
</template>
<script>
export default {
props: {
2021-05-18 16:09:55 +00:00
label: { type: String, default: null },
2021-07-13 05:37:29 +00:00
info: { type: String, default: null },
2021-05-18 16:09:55 +00:00
icon: { type: String, default: null },
id: { type: String, default: null, required: true },
2020-03-07 13:10:37 +00:00
selected: {
type: Boolean,
2020-03-07 13:10:37 +00:00
default: false,
},
},
data() {
return {
2021-07-07 23:28:42 +00:00
active: false,
2020-03-07 13:10:37 +00:00
}
},
mounted() {
2021-07-07 23:28:42 +00:00
this.active = this.selected
2020-03-07 13:10:37 +00:00
},
}
</script>