2024-09-20 17:59:42 +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">
|
|
|
|
<InputGroup class="md:w-80">
|
2024-09-20 18:08:09 +00:00
|
|
|
<InputGroupAddon>
|
|
|
|
<i class="pi pi-shopping-cart"></i>
|
|
|
|
</InputGroupAddon>
|
2024-09-20 17:59:42 +00:00
|
|
|
<IftaLabel>
|
2024-09-20 18:08:09 +00:00
|
|
|
<InputNumber v-model="value" inputId="price" mode="currency" currency="USD" locale="en-US" />
|
2024-09-20 17:59:42 +00:00
|
|
|
<label for="price">Price</label>
|
|
|
|
</IftaLabel>
|
|
|
|
</InputGroup>
|
|
|
|
</div>
|
|
|
|
<DocSectionCode :code="code" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
2024-09-20 18:08:09 +00:00
|
|
|
value: 10,
|
2024-09-20 17:59:42 +00:00
|
|
|
code: {
|
|
|
|
basic: `
|
2024-09-20 18:08:09 +00:00
|
|
|
<InputGroup class="md:w-80">
|
|
|
|
<InputGroupAddon>
|
|
|
|
<i class="pi pi-shopping-cart"></i>
|
|
|
|
</InputGroupAddon>
|
2024-09-20 17:59:42 +00:00
|
|
|
<IftaLabel>
|
2024-09-20 18:08:09 +00:00
|
|
|
<InputNumber v-model="value" inputId="price" mode="currency" currency="USD" locale="en-US" />
|
2024-09-20 17:59:42 +00:00
|
|
|
<label for="price">Price</label>
|
|
|
|
</IftaLabel>
|
|
|
|
</InputGroup>
|
|
|
|
`,
|
|
|
|
options: `
|
|
|
|
<template>
|
|
|
|
<div class="card flex justify-center">
|
|
|
|
<InputGroup class="md:w-80">
|
2024-09-20 18:08:09 +00:00
|
|
|
<InputGroupAddon>
|
|
|
|
<i class="pi pi-shopping-cart"></i>
|
|
|
|
</InputGroupAddon>
|
2024-09-20 17:59:42 +00:00
|
|
|
<IftaLabel>
|
2024-09-20 18:08:09 +00:00
|
|
|
<InputNumber v-model="value" inputId="price" mode="currency" currency="USD" locale="en-US" />
|
2024-09-20 17:59:42 +00:00
|
|
|
<label for="price">Price</label>
|
|
|
|
</IftaLabel>
|
|
|
|
</InputGroup>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
2024-09-20 18:08:09 +00:00
|
|
|
value: 10
|
2024-09-20 17:59:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
<\/script>
|
|
|
|
`,
|
|
|
|
composition: `
|
|
|
|
<template>
|
|
|
|
<div class="card flex justify-center">
|
|
|
|
<InputGroup class="md:w-80">
|
2024-09-20 18:08:09 +00:00
|
|
|
<InputGroupAddon>
|
|
|
|
<i class="pi pi-shopping-cart"></i>
|
|
|
|
</InputGroupAddon>
|
2024-09-20 17:59:42 +00:00
|
|
|
<IftaLabel>
|
2024-09-20 18:08:09 +00:00
|
|
|
<InputNumber v-model="value" inputId="price" mode="currency" currency="USD" locale="en-US" />
|
2024-09-20 17:59:42 +00:00
|
|
|
<label for="price">Price</label>
|
|
|
|
</IftaLabel>
|
|
|
|
</InputGroup>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ref } from 'vue';
|
|
|
|
|
2024-09-20 18:08:09 +00:00
|
|
|
const value = ref(10);
|
2024-09-20 17:59:42 +00:00
|
|
|
<\/script>
|
|
|
|
`
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|