primevue-mirror/doc/inputnumber/pt/PTDoc.vue

153 lines
3.7 KiB
Vue
Raw Normal View History

2023-05-05 12:57:15 +00:00
<template>
<DocSectionText v-bind="$attrs"></DocSectionText>
<div class="card flex justify-content-center">
<InputNumber
v-model="value"
showButtons
buttonLayout="horizontal"
:step="0.25"
incrementButtonIcon="pi pi-plus"
decrementButtonIcon="pi pi-minus"
mode="currency"
currency="EUR"
:pt="{
2023-12-05 13:17:22 +00:00
decrementButton: {
root: () => {
return {
class: 'bg-orange-500 border-orange-500'
};
}
},
incrementButton: {
root: () => {
return {
class: 'bg-teal-500 border-teal-500'
};
}
}
2023-05-05 12:57:15 +00:00
}"
/>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
value: 20,
code: {
2023-09-22 12:54:14 +00:00
basic: `
<InputNumber
2023-05-05 12:57:15 +00:00
v-model="value"
showButtons
buttonLayout="horizontal"
:step="0.25"
incrementButtonIcon="pi pi-plus"
decrementButtonIcon="pi pi-minus"
mode="currency"
currency="EUR"
:pt="{
2023-12-05 13:17:22 +00:00
decrementButton: {
root: () => {
return {
class: 'bg-orange-500 border-orange-500'
};
}
},
incrementButton: {
root: () => {
return {
class: 'bg-teal-500 border-teal-500'
};
}
}
2023-05-05 12:57:15 +00:00
}"
2023-10-15 09:38:39 +00:00
/>
`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2023-05-05 12:57:15 +00:00
<div class="card flex justify-content-center">
<InputNumber
v-model="value"
showButtons
buttonLayout="horizontal"
:step="0.25"
incrementButtonIcon="pi pi-plus"
decrementButtonIcon="pi pi-minus"
mode="currency"
currency="EUR"
:pt="{
2023-12-05 13:17:22 +00:00
decrementButton: {
root: () => {
return {
class: 'bg-orange-500 border-orange-500'
};
}
},
incrementButton: {
root: () => {
return {
class: 'bg-teal-500 border-teal-500'
};
}
}
2023-05-05 12:57:15 +00:00
}"
/>
</div>
</template>
<script>
export default {
data() {
return {
value: 20
};
}
};
2023-10-15 09:38:39 +00:00
<\/script>
`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-05-05 12:57:15 +00:00
<div class="card flex justify-content-center">
<InputNumber
v-model="value"
showButtons
buttonLayout="horizontal"
:step="0.25"
incrementButtonIcon="pi pi-plus"
decrementButtonIcon="pi pi-minus"
mode="currency"
currency="EUR"
:pt="{
2023-12-05 13:17:22 +00:00
decrementButton: {
root: () => {
return {
class: 'bg-orange-500 border-orange-500'
};
}
},
incrementButton: {
root: () => {
return {
class: 'bg-teal-500 border-teal-500'
};
}
}
2023-05-05 12:57:15 +00:00
}"
/>
</div>
</template>
<script setup>
import { ref } from "vue";
const value = ref(20);
2023-10-15 09:38:39 +00:00
<\/script>
`
2023-05-05 12:57:15 +00:00
}
};
}
};
</script>