2023-02-28 08:29:30 +00:00
|
|
|
<template>
|
|
|
|
<div :class="['doc-component', className]">
|
|
|
|
<Head>
|
|
|
|
<Title>{{ title }}</Title>
|
|
|
|
<Meta name="description" :content="description" />
|
|
|
|
</Head>
|
|
|
|
|
|
|
|
<ul class="doc-tabmenu">
|
|
|
|
<li :class="{ 'doc-tabmenu-active': tab === 0 }">
|
2023-03-27 15:03:02 +00:00
|
|
|
<button type="button" @click="tab = 0">FEATURES</button>
|
2023-02-28 08:29:30 +00:00
|
|
|
</li>
|
2023-03-10 10:17:35 +00:00
|
|
|
<li :class="{ 'doc-tabmenu-active': tab === 1 }">
|
2023-02-28 08:29:30 +00:00
|
|
|
<button type="button" @click="tab = 1">API</button>
|
|
|
|
</li>
|
2023-03-31 23:42:09 +00:00
|
|
|
<li v-if="ptTabComponent" :class="{ 'doc-tabmenu-active': tab === 2 }">
|
2023-04-03 12:39:25 +00:00
|
|
|
<button type="button" @click="tab = 2">PASS THROUGH</button>
|
2023-03-31 23:42:09 +00:00
|
|
|
</li>
|
2023-02-28 08:29:30 +00:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div class="doc-tabpanels">
|
2023-03-27 15:03:02 +00:00
|
|
|
<div v-show="tab === 0" class="doc-tabpanel">
|
|
|
|
<div class="doc-main">
|
|
|
|
<div class="doc-intro">
|
|
|
|
<h1>{{ header }}</h1>
|
|
|
|
<p>{{ description }}</p>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
2023-03-27 15:03:02 +00:00
|
|
|
<DocSections :docs="componentDocs" />
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
2023-03-27 15:03:02 +00:00
|
|
|
<DocSectionNav :docs="componentDocs" />
|
|
|
|
</div>
|
2023-02-28 08:29:30 +00:00
|
|
|
|
2023-03-27 15:03:02 +00:00
|
|
|
<div v-show="tab === 1" class="doc-tabpanel">
|
|
|
|
<DocApiSection :doc="apiDocs" :header="header" />
|
|
|
|
</div>
|
2023-03-31 23:42:09 +00:00
|
|
|
|
|
|
|
<div v-if="tab === 2" class="doc-tabpanel">
|
|
|
|
<component :is="{ ...ptTabComponent }" />
|
|
|
|
</div>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2023-03-31 23:42:09 +00:00
|
|
|
props: ['title', 'header', 'description', 'componentDocs', 'apiDocs', 'className', 'ptTabComponent'],
|
2023-02-28 08:29:30 +00:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
tab: 0
|
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted() {
|
2023-04-25 10:35:16 +00:00
|
|
|
this.tab = this.$route.hash.includes('api') ? 1 : this.$route.hash.includes('pt') ? 2 : 0;
|
2023-02-28 08:29:30 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|