Spinner doc added
parent
4187e348ec
commit
09c0d7980a
|
@ -20,10 +20,14 @@
|
|||
<h3>Disabled</h3>
|
||||
<Spinner v-model="value4" :disabled="true" />
|
||||
</div>
|
||||
|
||||
<SpinnerDoc/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SpinnerDoc from './SpinnerDoc';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -32,6 +36,9 @@ export default {
|
|||
value3: null,
|
||||
value4: null
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'SpinnerDoc': SpinnerDoc
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,177 @@
|
|||
<template>
|
||||
<div class="content-section documentation">
|
||||
<TabView>
|
||||
<TabPanel header="Documentation">
|
||||
<h3>Import</h3>
|
||||
<CodeHighlight lang="javascript">
|
||||
import Spinner from 'primevue/spinner';
|
||||
</CodeHighlight>
|
||||
|
||||
<h3>Getting Started</h3>
|
||||
<p>Two-way value binding is defined using standard v-model directive.</p>
|
||||
<CodeHighlight>
|
||||
<Spinner v-model="value" />
|
||||
</CodeHighlight>
|
||||
|
||||
<h3>Min-Max</h3>
|
||||
<p>Boundaries are specified with <i>min</i> and <i>max</i> attributes.</p>
|
||||
<CodeHighlight>
|
||||
<Spinner v-model="value" :min="0" :max="100" />
|
||||
</CodeHighlight>
|
||||
|
||||
<h3>Step</h3>
|
||||
<p>Step factor is 1 by default and can be customized with <i>step</i> option.</p>
|
||||
<CodeHighlight>
|
||||
<Spinner v-model="value" :step="0.25" />
|
||||
</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>value</td>
|
||||
<td>string</td>
|
||||
<td>null</td>
|
||||
<td>Value of the component.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>step</td>
|
||||
<td>number</td>
|
||||
<td>1</td>
|
||||
<td>Step factor to increment/decrement the value.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>min</td>
|
||||
<td>number</td>
|
||||
<td>null</td>
|
||||
<td>Mininum boundary value.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>max</td>
|
||||
<td>number</td>
|
||||
<td>null</td>
|
||||
<td>Maximum boundary value.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>disabled</td>
|
||||
<td>boolean</td>
|
||||
<td>false</td>
|
||||
<td>When present, it specifies that the element should be disabled.</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>input</td>
|
||||
<td>event: New value</td>
|
||||
<td>Callback to invoke on value change.</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-spinner</td>
|
||||
<td>Container element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p-spinner-up</td>
|
||||
<td>Up icon.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p-spinner-down</td>
|
||||
<td>Down icon.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p-spinner-input</td>
|
||||
<td>Input element</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/spinner" 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>Spinner</h1>
|
||||
<p>Spinner is an input component to provide a numerical input.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content-section implementation">
|
||||
<h3 class="first">Basic</h3>
|
||||
<Spinner v-model="value1" />
|
||||
|
||||
<h3>Min/Max</h3>
|
||||
<Spinner v-model="value2" :min="0" :max="100" />
|
||||
|
||||
<h3>Step</h3>
|
||||
<Spinner v-model="value3" :step="0.25" />
|
||||
|
||||
<h3>Disabled</h3>
|
||||
<Spinner v-model="value4" :disabled="true" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</CodeHighlight>
|
||||
|
||||
<CodeHighlight lang="javascript">
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
value1: null,
|
||||
value2: null,
|
||||
value3: null,
|
||||
value4: null
|
||||
}
|
||||
}
|
||||
}
|
||||
</CodeHighlight>
|
||||
</TabPanel>
|
||||
</TabView>
|
||||
</div>
|
||||
</template>
|
Loading…
Reference in New Issue