mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2025-01-19 17:21:41 +03:00
dcbd1d3e51
- use official dark theme - fix: Fix Tabs
42 lines
727 B
Vue
42 lines
727 B
Vue
<template>
|
|
<div
|
|
class="tab-pane fade"
|
|
:id="tabID"
|
|
role="tabpanel"
|
|
:aria-labelledby="labelID"
|
|
>
|
|
<slot />
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { defineComponent } from "vue";
|
|
|
|
export default defineComponent({
|
|
props: {
|
|
title: {
|
|
type: String,
|
|
},
|
|
},
|
|
data() {
|
|
let tag = this.title;
|
|
return {
|
|
tabID: tag,
|
|
};
|
|
},
|
|
mounted() {
|
|
this.tabID = "tab-" + Math.random().toString(36).substring(2);
|
|
this.$parent.$data.children.push({ id: this.tabID, title: this.title });
|
|
},
|
|
computed: {
|
|
labelID(): String {
|
|
return this.tabID + "-label";
|
|
},
|
|
},
|
|
});
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
@import "node_modules/bootstrap/scss/bootstrap";
|
|
</style>
|