primevue-mirror/doc/drawer/TemplateDoc.vue

91 lines
3.5 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
2023-11-01 14:31:21 +00:00
<p>Additional content at the header section is provided using the <i>header</i> template.</p>
2023-02-28 08:29:30 +00:00
</DocSectionText>
<div class="card flex justify-content-center">
2024-04-18 14:22:30 +00:00
<Drawer v-model:visible="visible">
2023-02-28 08:29:30 +00:00
<template #header>
2023-11-20 07:48:32 +00:00
<div class="flex align-items-center gap-2">
2023-11-01 14:31:21 +00:00
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" />
<span class="font-bold">Amy Elsner</span>
2023-02-28 08:29:30 +00:00
</div>
</template>
2023-11-01 14:31:21 +00:00
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
2024-04-18 14:22:30 +00:00
</Drawer>
2023-02-28 08:29:30 +00:00
<Button icon="pi pi-plus" @click="visible = true" />
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
visible: false,
code: {
2023-09-22 12:54:14 +00:00
basic: `
2024-04-18 14:22:30 +00:00
<Drawer v-model:visible="visible">
2023-11-01 14:31:21 +00:00
<template #header>
2023-11-20 07:48:32 +00:00
<div class="flex align-items-center gap-2">
2023-11-01 14:31:21 +00:00
<Avatar image="/images/avatar/amyelsner.png" shape="circle" />
<span class="font-bold">Amy Elsner</span>
</div>
</template>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
2024-04-18 14:22:30 +00:00
</Drawer>
2023-11-01 14:31:21 +00:00
<Button icon="pi pi-plus" @click="visible = true" />
2023-10-15 09:38:39 +00:00
`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card flex justify-content-center">
2024-04-18 14:22:30 +00:00
<Drawer v-model:visible="visible">
2023-02-28 08:29:30 +00:00
<template #header>
2023-11-20 07:48:32 +00:00
<div class="flex align-items-center gap-2">
2023-11-01 14:31:21 +00:00
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" />
<span class="font-bold">Amy Elsner</span>
2023-02-28 08:29:30 +00:00
</div>
</template>
2023-11-01 14:31:21 +00:00
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
2024-04-18 14:22:30 +00:00
</Drawer>
2023-02-28 08:29:30 +00:00
<Button icon="pi pi-plus" @click="visible = true" />
</div>
</template>
<script>
export default {
data() {
return {
visible: false
}
}
}
2023-10-15 09:38:39 +00:00
<\/script>
`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card flex justify-content-center">
2024-04-18 14:22:30 +00:00
<Drawer v-model:visible="visible">
2023-02-28 08:29:30 +00:00
<template #header>
2023-11-20 07:48:32 +00:00
<div class="flex align-items-center gap-2">
2023-11-01 14:31:21 +00:00
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" />
<span class="font-bold">Amy Elsner</span>
2023-02-28 08:29:30 +00:00
</div>
</template>
2023-11-20 07:48:32 +00:00
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
2024-04-18 14:22:30 +00:00
</Drawer>
2023-02-28 08:29:30 +00:00
<Button icon="pi pi-plus" @click="visible = true" />
</div>
</template>
<script setup>
import { ref } from "vue";
const visible = ref(false);
2023-10-15 09:38:39 +00:00
<\/script>
`
2023-02-28 08:29:30 +00:00
}
};
}
};
</script>