Use v-show for API
parent
61dc1a7dd3
commit
2685655b51
|
@ -7,7 +7,7 @@
|
|||
|
||||
<ul class="doc-tabmenu">
|
||||
<li :class="{ 'doc-tabmenu-active': tab === 0 }">
|
||||
<button type="button" @click="tab = 0">COMPONENT</button>
|
||||
<button type="button" @click="tab = 0">FEATURES</button>
|
||||
</li>
|
||||
<li :class="{ 'doc-tabmenu-active': tab === 1 }">
|
||||
<button type="button" @click="tab = 1">API</button>
|
||||
|
@ -15,24 +15,20 @@
|
|||
</ul>
|
||||
|
||||
<div class="doc-tabpanels">
|
||||
<template v-if="tab === 0">
|
||||
<div class="doc-tabpanel">
|
||||
<div class="doc-main">
|
||||
<div class="doc-intro">
|
||||
<h1>{{ header }}</h1>
|
||||
<p>{{ description }}</p>
|
||||
</div>
|
||||
<DocSections :docs="componentDocs" />
|
||||
<div v-show="tab === 0" class="doc-tabpanel">
|
||||
<div class="doc-main">
|
||||
<div class="doc-intro">
|
||||
<h1>{{ header }}</h1>
|
||||
<p>{{ description }}</p>
|
||||
</div>
|
||||
<DocSectionNav :docs="componentDocs" />
|
||||
<DocSections :docs="componentDocs" />
|
||||
</div>
|
||||
</template>
|
||||
<DocSectionNav :docs="componentDocs" />
|
||||
</div>
|
||||
|
||||
<template v-else-if="tab === 1">
|
||||
<div class="doc-tabpanel">
|
||||
<DocApiSection :doc="apiDocs" :header="header" />
|
||||
</div>
|
||||
</template>
|
||||
<div v-show="tab === 1" class="doc-tabpanel">
|
||||
<DocApiSection :doc="apiDocs" :header="header" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue