primevue-mirror/apps/showcase/doc/inputnumber/IftaLabelDoc.vue

67 lines
1.7 KiB
Vue
Raw Permalink Normal View History

2024-09-20 11:22:33 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>IftaLabel is used to create infield top aligned labels. Visit <PrimeVueNuxtLink to="/iftalabel">IftaLabel</PrimeVueNuxtLink> documentation for more information.</p>
</DocSectionText>
<div class="card flex justify-center">
<IftaLabel>
2024-09-30 07:24:04 +00:00
<InputNumber v-model="value" inputId="price_input" mode="currency" currency="USD" locale="en-US" variant="filled" />
2024-09-20 11:22:33 +00:00
<label for="price_input">Price</label>
</IftaLabel>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
value: 1,
code: {
basic: `
<IftaLabel>
2024-09-30 07:24:04 +00:00
<InputNumber v-model="value" inputId="price_input" mode="currency" currency="USD" locale="en-US" variant="filled" />
2024-09-20 11:22:33 +00:00
<label for="price_input">Price</label>
</IftaLabel>
`,
options: `
<template>
<div class="card flex justify-center">
<IftaLabel>
2024-09-30 07:24:04 +00:00
<InputNumber v-model="value" inputId="price_input" mode="currency" currency="USD" locale="en-US" variant="filled" />
2024-09-20 11:22:33 +00:00
<label for="price_input">Price</label>
</IftaLabel>
</div>
</template>
<script>
export default {
data() {
return {
value: 1
};
}
};
<\/script>
`,
composition: `
<template>
<div class="card flex justify-center">
<IftaLabel>
2024-09-30 07:24:04 +00:00
<InputNumber v-model="value" inputId="price_input" mode="currency" currency="USD" locale="en-US" variant="filled" />
2024-09-20 11:22:33 +00:00
<label for="price_input">Price</label>
</IftaLabel>
</div>
</template>
<script setup>
import { ref } from "vue";
const value = ref(1);
<\/script>
`
}
};
}
};
</script>