37 lines
528 B
Vue
37 lines
528 B
Vue
<template>
|
|
<div v-show="isActive">
|
|
<slot></slot>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped lang="scss"></style>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
label: { type: String },
|
|
icon: { type: String },
|
|
id: { required: true },
|
|
selected: {
|
|
default: false,
|
|
},
|
|
},
|
|
|
|
data() {
|
|
return {
|
|
isActive: false,
|
|
}
|
|
},
|
|
|
|
// computed: {
|
|
// href() {
|
|
// return `#${this.label.toLowerCase().replace(/ /g, "-")}`
|
|
// },
|
|
// },
|
|
|
|
mounted() {
|
|
this.isActive = this.selected
|
|
},
|
|
}
|
|
</script>
|