2023-02-28 08:29:30 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
|
|
|
<p>Buttons can also placed vertically by setting <i>buttonLayout</i> as <i>vertical</i>.</p>
|
|
|
|
</DocSectionText>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="card flex justify-center">
|
2024-02-04 22:21:29 +00:00
|
|
|
<InputNumber v-model="value" showButtons buttonLayout="vertical" style="width: 3rem" :min="0" :max="99">
|
2023-12-20 09:25:33 +00:00
|
|
|
<template #incrementbuttonicon>
|
|
|
|
<span class="pi pi-plus" />
|
|
|
|
</template>
|
|
|
|
<template #decrementbuttonicon>
|
|
|
|
<span class="pi pi-minus" />
|
|
|
|
</template>
|
|
|
|
</InputNumber>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
|
|
|
<DocSectionCode :code="code" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
value: 50,
|
|
|
|
code: {
|
2023-09-22 12:54:14 +00:00
|
|
|
basic: `
|
2024-02-04 22:21:29 +00:00
|
|
|
<InputNumber v-model="value" showButtons buttonLayout="vertical" style="width: 3rem" :min="0" :max="99">
|
2023-12-20 09:25:33 +00:00
|
|
|
<template #incrementbuttonicon>
|
|
|
|
<span class="pi pi-plus" />
|
|
|
|
</template>
|
|
|
|
<template #decrementbuttonicon>
|
|
|
|
<span class="pi pi-minus" />
|
|
|
|
</template>
|
|
|
|
</InputNumber>
|
2023-10-15 09:38:39 +00:00
|
|
|
`,
|
2023-09-22 12:54:14 +00:00
|
|
|
options: `
|
|
|
|
<template>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="card flex justify-center">
|
2024-02-04 22:21:29 +00:00
|
|
|
<InputNumber v-model="value" showButtons buttonLayout="vertical" style="width: 3rem" :min="0" :max="99">
|
2023-12-20 09:25:33 +00:00
|
|
|
<template #incrementbuttonicon>
|
|
|
|
<span class="pi pi-plus" />
|
|
|
|
</template>
|
|
|
|
<template #decrementbuttonicon>
|
|
|
|
<span class="pi pi-minus" />
|
|
|
|
</template>
|
|
|
|
</InputNumber>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
value: 50
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-10-15 09:38:39 +00:00
|
|
|
<\/script>
|
|
|
|
`,
|
2023-09-22 12:54:14 +00:00
|
|
|
composition: `
|
|
|
|
<template>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="card flex justify-center">
|
2024-02-04 22:21:29 +00:00
|
|
|
<InputNumber v-model="value" showButtons buttonLayout="vertical" style="width: 3rem" :min="0" :max="99">
|
2023-12-20 09:25:33 +00:00
|
|
|
<template #incrementbuttonicon>
|
|
|
|
<span class="pi pi-plus" />
|
|
|
|
</template>
|
|
|
|
<template #decrementbuttonicon>
|
|
|
|
<span class="pi pi-minus" />
|
|
|
|
</template>
|
|
|
|
</InputNumber>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
2023-10-25 14:55:12 +00:00
|
|
|
import { ref } from "vue";
|
2023-02-28 08:29:30 +00:00
|
|
|
|
|
|
|
const value = ref(50);
|
2023-10-15 09:38:39 +00:00
|
|
|
<\/script>
|
|
|
|
`
|
2023-02-28 08:29:30 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|