154 lines
4.6 KiB
Vue
Executable File
154 lines
4.6 KiB
Vue
Executable File
<template>
|
|
<div class="content-section documentation">
|
|
<TabView>
|
|
<TabPanel header="Documentation">
|
|
<h3>Import</h3>
|
|
<CodeHighlight lang="javascript">
|
|
import Steps from 'primevue/steps';
|
|
</CodeHighlight>
|
|
|
|
<h3>MenuModel</h3>
|
|
<p>Steps uses the common MenuModel API to define the items, visit <router-link to="/menumodel">MenuModel API</router-link> for details.</p>
|
|
|
|
<h3>Getting Started</h3>
|
|
<p>Steps is integrated with Vue Router and requires a collection of menuitems as its model.</p>
|
|
<CodeHighlight>
|
|
<Steps :model="items" />
|
|
<router-view />
|
|
</CodeHighlight>
|
|
|
|
<CodeHighlight lang="js">
|
|
export default {
|
|
data() {
|
|
return {
|
|
items: [{
|
|
label: 'Personal',
|
|
to: '/steps'
|
|
},
|
|
{
|
|
label: 'Seat',
|
|
to: '/steps/seat'
|
|
},
|
|
{
|
|
label: 'Payment',
|
|
to: '/steps/payment'
|
|
},
|
|
{
|
|
label: 'Confirmation',
|
|
to: '/steps/confirmation'
|
|
}]
|
|
}
|
|
}
|
|
}
|
|
</CodeHighlight>
|
|
|
|
<h3>Interactive</h3>
|
|
<p>Items are readonly by default, if you'd like to make them interactive then disable <i>readonly</i> property.</p>
|
|
<CodeHighlight>
|
|
<Steps :model="items" :readonly="false" />
|
|
<router-view />
|
|
</CodeHighlight>
|
|
|
|
<h3>Properties</h3>
|
|
<p>Any attribute such as style and class are passed to the main container element. Following are the additional properties to configure the component.</p>
|
|
<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>model</td>
|
|
<td>array</td>
|
|
<td>null</td>
|
|
<td>An array of menuitems.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>readonly</td>
|
|
<td>boolean</td>
|
|
<td>true</td>
|
|
<td>Whether the items are clickable or not.</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-steps</td>
|
|
<td>Container element.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>p-steps-item</td>
|
|
<td>Menuitem element.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>p-steps-number</td>
|
|
<td>Number of menuitem.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>p-steps-title</td>
|
|
<td>Label of menuitem.</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/tabmenu" class="btn-viewsource" target="_blank" rel="noopener noreferrer">
|
|
<span>View on GitHub</span>
|
|
</a>
|
|
<CodeHighlight>
|
|
<template v-pre>
|
|
<Steps :model="items" :readonly="false" />
|
|
<router-view />
|
|
</template>
|
|
</CodeHighlight>
|
|
|
|
<CodeHighlight lang="javascript">
|
|
export default {
|
|
data() {
|
|
return {
|
|
items: [{
|
|
label: 'Personal',
|
|
to: '/steps'
|
|
},
|
|
{
|
|
label: 'Seat',
|
|
to: '/steps/seat'
|
|
},
|
|
{
|
|
label: 'Payment',
|
|
to: '/steps/payment'
|
|
},
|
|
{
|
|
label: 'Confirmation',
|
|
to: '/steps/confirmation'
|
|
}]
|
|
}
|
|
}
|
|
}
|
|
</CodeHighlight>
|
|
</TabPanel>
|
|
</TabView>
|
|
</div>
|
|
</template> |