Sidebar doc added
parent
48b09bab5e
commit
1f7694a2d9
|
@ -44,10 +44,14 @@
|
||||||
<Button icon="pi pi-arrow-up" @click="visibleBottom = true" style="margin-right:.25em" />
|
<Button icon="pi pi-arrow-up" @click="visibleBottom = true" style="margin-right:.25em" />
|
||||||
<Button icon="pi pi-th-large" @click="visibleFull = true" />
|
<Button icon="pi pi-th-large" @click="visibleFull = true" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<SidebarDoc/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import SidebarDoc from './SidebarDoc';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -57,6 +61,9 @@ export default {
|
||||||
visibleBottom: false,
|
visibleBottom: false,
|
||||||
visibleFull: false
|
visibleFull: false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
'SidebarDoc': SidebarDoc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -0,0 +1,268 @@
|
||||||
|
<template>
|
||||||
|
<div class="content-section documentation">
|
||||||
|
<TabView>
|
||||||
|
<TabPanel header="Documentation">
|
||||||
|
<h3>Import</h3>
|
||||||
|
<CodeHighlight lang="javascript">
|
||||||
|
import Sidebar from 'primevue/sidebar';
|
||||||
|
</CodeHighlight>
|
||||||
|
|
||||||
|
<h3>Getting Started</h3>
|
||||||
|
<p>Sidebar is used as a container and visibility is controlled with <i>visible</i> property.</p>
|
||||||
|
<CodeHighlight>
|
||||||
|
<Sidebar :visible.sync="visibleLeft" :baseZIndex="1000">
|
||||||
|
Content
|
||||||
|
</Sidebar>
|
||||||
|
|
||||||
|
<Button icon="pi pi-arrow-right" @click="visibleLeft = true" />
|
||||||
|
</CodeHighlight>
|
||||||
|
|
||||||
|
<h3>Position</h3>
|
||||||
|
<p>Sidebar can either be located on the left (default), right, top or bottom of the screen depending on the <i>position</i> property.</p>
|
||||||
|
<CodeHighlight>
|
||||||
|
<Sidebar :visible.sync="visibleRight" :baseZIndex="1000" position="right">
|
||||||
|
Content
|
||||||
|
</Sidebar>
|
||||||
|
</CodeHighlight>
|
||||||
|
|
||||||
|
<h3>Size</h3>
|
||||||
|
<p>Sidebar size can be changed using a fixed value or using one of the three predefined ones.</p>
|
||||||
|
<CodeHighlight>
|
||||||
|
<Sidebar :visible.sync="visibleLeft" class="p-sidebar-sm"></Sidebar>
|
||||||
|
<Sidebar :visible.sync="visibleLeft" class="p-sidebar-md"></Sidebar>
|
||||||
|
<Sidebar :visible.sync="visibleLeft" class="p-sidebar-lg"></Sidebar>
|
||||||
|
</CodeHighlight>
|
||||||
|
|
||||||
|
<h3>Full Screen</h3>
|
||||||
|
<p>Full screen mode allows the sidebar to cover whole screen.</p>
|
||||||
|
<CodeHighlight>
|
||||||
|
<Sidebar :visible.sync="visibleFull" position="full">
|
||||||
|
Content
|
||||||
|
</Sidebar>
|
||||||
|
</CodeHighlight>
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Properties</h3>
|
||||||
|
<div class="doc-tablewrapper">
|
||||||
|
<table class="doc-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Type</th>
|
||||||
|
<th>Default</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>visible</td>
|
||||||
|
<td>boolean</td>
|
||||||
|
<td>false</td>
|
||||||
|
<td>Specifies the visibility of the dialog.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>position</td>
|
||||||
|
<td>string</td>
|
||||||
|
<td>left</td>
|
||||||
|
<td>Specifies the position of the sidebar, valid values are "left", "right", "top", "bottom" and "full".</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>baseZIndex</td>
|
||||||
|
<td>number</td>
|
||||||
|
<td>0</td>
|
||||||
|
<td>Base zIndex value to use in layering.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>autoZIndex</td>
|
||||||
|
<td>boolean</td>
|
||||||
|
<td>true</td>
|
||||||
|
<td>Whether to automatically manage layering.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>dismissable</td>
|
||||||
|
<td>boolean</td>
|
||||||
|
<td>true</td>
|
||||||
|
<td>Whether clicking outside closes the panel.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>showCloseIcon</td>
|
||||||
|
<td>boolean</td>
|
||||||
|
<td>true</td>
|
||||||
|
<td>Whether to display a close icon inside the panel.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>modal</td>
|
||||||
|
<td>boolean</td>
|
||||||
|
<td>true</td>
|
||||||
|
<td>Whether to a modal layer behind the sidebar.</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>Events</h3>
|
||||||
|
<div class="doc-tablewrapper">
|
||||||
|
<table class="doc-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Parameters</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>hide</td>
|
||||||
|
<td>-</td>
|
||||||
|
<td>Callback to invoke when sidebar gets hidden.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>show</td>
|
||||||
|
<td>-</td>
|
||||||
|
<td>Callback to invoke when sidebar gets shown.</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>Styling</h3>
|
||||||
|
<p>Following is the list of structural style classes, for theming classes visit <router-link to="/theming">theming</router-link> page.</p>
|
||||||
|
<div class="doc-tablewrapper">
|
||||||
|
<table class="doc-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Element</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>p-sidebar</td>
|
||||||
|
<td>Container element</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>p-sidebar-left</td>
|
||||||
|
<td>Container element of left sidebar.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>p-sidebar-right</td>
|
||||||
|
<td>Container element of right sidebar.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>p-sidebar-top</td>
|
||||||
|
<td>Container element of top sidebar.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>p-sidebar-bottom</td>
|
||||||
|
<td>Container element of bottom sidebar.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>p-sidebar-full</td>
|
||||||
|
<td>Container element of a full screen sidebar.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>p-sidebar-active</td>
|
||||||
|
<td>Container element when sidebar is visible.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>p-sidebar-close</td>
|
||||||
|
<td>Close anchor element.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>p-sidebar-sm</td>
|
||||||
|
<td>Small sized sidebar.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>p-sidebar-md</td>
|
||||||
|
<td>Medium sized sidebar.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>p-sidebar-lg</td>
|
||||||
|
<td>Large sized sidebar.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>p-sidebar-mask</td>
|
||||||
|
<td>Modal layer of the sidebar.</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>Dependencies</h3>
|
||||||
|
<p>None.</p>
|
||||||
|
</TabPanel>
|
||||||
|
|
||||||
|
<TabPanel header="Source">
|
||||||
|
<a href="https://github.com/primefaces/primevue/tree/master/src/views/sidebar" class="btn-viewsource" target="_blank" rel="noopener noreferrer">
|
||||||
|
<span>View on GitHub</span>
|
||||||
|
</a>
|
||||||
|
<CodeHighlight>
|
||||||
|
<template v-pre>
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="content-section introduction">
|
||||||
|
<div class="feature-intro">
|
||||||
|
<h1>Sidebar</h1>
|
||||||
|
<p>Sidebar is a panel component displayed as an overlay at the edges of the screen.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="content-section implementation">
|
||||||
|
<Sidebar :visible.sync="visibleLeft" :baseZIndex="1000">
|
||||||
|
<h1 style="fontWeight:normal">Left Sidebar</h1>
|
||||||
|
<Button type="button" @click="visibleLeft = false" label="Save" class="p-button-success" style="margin-right:.25em" />
|
||||||
|
<Button type="button" @click="visibleLeft = false" label="Cancel" class="p-button-secondary"/>
|
||||||
|
</Sidebar>
|
||||||
|
|
||||||
|
<Sidebar :visible.sync="visibleRight" :baseZIndex="1000" position="right">
|
||||||
|
<h1 style="fontWeight:normal">Right Sidebar</h1>
|
||||||
|
<Button type="button" @click="visibleRight = false" label="Save" class="p-button-success" style="margin-right:.25em" />
|
||||||
|
<Button type="button" @click="visibleRight = false" label="Cancel" class="p-button-secondary"/>
|
||||||
|
</Sidebar>
|
||||||
|
|
||||||
|
<Sidebar :visible.sync="visibleTop" :baseZIndex="1000" position="top">
|
||||||
|
<h1 style="fontWeight:normal">Top Sidebar</h1>
|
||||||
|
<Button type="button" @click="visibleTop = false" label="Save" class="p-button-success" style="margin-right:.25em" />
|
||||||
|
<Button type="button" @click="visibleTop = false" label="Cancel" class="p-button-secondary"/>
|
||||||
|
</Sidebar>
|
||||||
|
|
||||||
|
<Sidebar :visible.sync="visibleBottom" :baseZIndex="1000" position="bottom">
|
||||||
|
<h1 style="fontWeight:normal">Bottom Sidebar</h1>
|
||||||
|
<Button type="button" @click="visibleBottom = false" label="Save" class="p-button-success" style="margin-right:.25em" />
|
||||||
|
<Button type="button" @click="visibleBottom = false" label="Cancel" class="p-button-secondary"/>
|
||||||
|
</Sidebar>
|
||||||
|
|
||||||
|
<Sidebar :visible.sync="visibleFull" :baseZIndex="1000" position="full">
|
||||||
|
<h1 style="fontWeight:normal">Full Screen</h1>
|
||||||
|
<Button type="button" @click="visibleFull = false" label="Save" class="p-button-success" style="margin-right:.25em" />
|
||||||
|
<Button type="button" @click="visibleFull = false" label="Cancel" class="p-button-secondary"/>
|
||||||
|
</Sidebar>
|
||||||
|
|
||||||
|
<Button icon="pi pi-arrow-right" @click="visibleLeft = true" style="margin-right:.25em" />
|
||||||
|
<Button icon="pi pi-arrow-left" @click="visibleRight = true" style="margin-right:.25em" />
|
||||||
|
<Button icon="pi pi-arrow-down" @click="visibleTop = true" style="margin-right:.25em" />
|
||||||
|
<Button icon="pi pi-arrow-up" @click="visibleBottom = true" style="margin-right:.25em" />
|
||||||
|
<Button icon="pi pi-th-large" @click="visibleFull = true" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</CodeHighlight>
|
||||||
|
|
||||||
|
<CodeHighlight lang="javascript">
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visibleLeft: false,
|
||||||
|
visibleRight: false,
|
||||||
|
visibleTop: false,
|
||||||
|
visibleBottom: false,
|
||||||
|
visibleFull: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</CodeHighlight>
|
||||||
|
</TabPanel>
|
||||||
|
</TabView>
|
||||||
|
</div>
|
||||||
|
</template>
|
Loading…
Reference in New Issue