mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Update doc components structure
This commit is contained in:
parent
cf5dd67244
commit
036b90fc82
16 changed files with 18 additions and 14 deletions
55
components/doc/DocComponent.vue
Normal file
55
components/doc/DocComponent.vue
Normal file
|
@ -0,0 +1,55 @@
|
|||
<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 }">
|
||||
<button type="button" @click="tab = 0">FEATURES</button>
|
||||
</li>
|
||||
<li :class="{ 'doc-tabmenu-active': tab === 1 }">
|
||||
<button type="button" @click="tab = 1">API</button>
|
||||
</li>
|
||||
<li v-if="ptTabComponent" :class="{ 'doc-tabmenu-active': tab === 2 }">
|
||||
<button type="button" @click="tab = 2">Pass Through</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="doc-tabpanels">
|
||||
<div v-show="tab === 0" class="doc-tabpanel">
|
||||
<div class="doc-main">
|
||||
<div class="doc-intro">
|
||||
<h1>{{ header }}</h1>
|
||||
<p>{{ description }}</p>
|
||||
</div>
|
||||
<DocSections :docs="componentDocs" />
|
||||
</div>
|
||||
<DocSectionNav :docs="componentDocs" />
|
||||
</div>
|
||||
|
||||
<div v-show="tab === 1" class="doc-tabpanel">
|
||||
<DocApiSection :doc="apiDocs" :header="header" />
|
||||
</div>
|
||||
|
||||
<div v-if="tab === 2" class="doc-tabpanel">
|
||||
<component :is="{ ...ptTabComponent }" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['title', 'header', 'description', 'componentDocs', 'apiDocs', 'className', 'ptTabComponent'],
|
||||
data() {
|
||||
return {
|
||||
tab: 0
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.tab = this.$route.hash.includes('api') ? 1 : 0;
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue