primevue-mirror/doc/calendar/FloatLabelDoc.vue

61 lines
1.5 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>A floating label appears on top of the input field when focused.</p>
</DocSectionText>
<div class="card flex justify-content-center">
<span class="p-float-label">
<Calendar v-model="date" inputId="birth_date" />
<label for="birth_date">Birth Date</label>
</span>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
date: null,
code: {
2023-08-16 13:58:31 +00:00
basic: `<span class="p-float-label">
2023-02-28 08:29:30 +00:00
<Calendar v-model="date" inputId="birth_date" />
<label for="birth_date">Birth Date</label>
</span>`,
2023-08-16 13:58:31 +00:00
options: `<template>
2023-02-28 08:29:30 +00:00
<div class="card flex justify-content-center">
<span class="p-float-label">
<Calendar v-model="date" inputId="birth_date" />
<label for="birth_date">Birth Date</label>
</span>
</div>
</template>
<script>
export default {
data() {
return {
date: null
};
}
};
<\/script>`,
2023-08-16 13:58:31 +00:00
composition: `<template>
2023-02-28 08:29:30 +00:00
<div class="card flex justify-content-center">
<span class="p-float-label">
<Calendar v-model="date" inputId="birth_date" />
<label for="birth_date">Birth Date</label>
</span>
</div>
</template>
<script setup>
import { ref } from "vue";
const date = ref();
<\/script>`
}
};
}
};
</script>