2023-02-28 08:29:30 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
|
|
|
<p>Additional content at the header section is provided using the <i>header</i> slot.</p>
|
|
|
|
</DocSectionText>
|
|
|
|
<div class="card flex justify-content-center">
|
|
|
|
<Sidebar v-model:visible="visible">
|
|
|
|
<h2>Sidebar</h2>
|
|
|
|
<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>
|
|
|
|
<template #header>
|
|
|
|
<div class="flex">
|
|
|
|
<button class="p-sidebar-icon p-link mr-2">
|
|
|
|
<span class="pi pi-print" />
|
|
|
|
</button>
|
|
|
|
<button class="p-sidebar-icon p-link mr-2">
|
|
|
|
<span class="pi pi-search" />
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</Sidebar>
|
|
|
|
<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: `
|
|
|
|
<div class="card flex justify-content-center">
|
2023-02-28 08:29:30 +00:00
|
|
|
<Sidebar v-model:visible="visible">
|
|
|
|
<h2>Sidebar</h2>
|
|
|
|
<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>
|
|
|
|
<template #header>
|
|
|
|
<div class="flex">
|
|
|
|
<button class="p-sidebar-icon p-link mr-2">
|
|
|
|
<span class="pi pi-print" />
|
|
|
|
</button>
|
|
|
|
<button class="p-sidebar-icon p-link mr-2">
|
|
|
|
<span class="pi pi-search" />
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</Sidebar>
|
|
|
|
<Button icon="pi pi-plus" @click="visible = true" />
|
2023-10-15 09:38:39 +00:00
|
|
|
</div>
|
|
|
|
`,
|
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">
|
|
|
|
<Sidebar v-model:visible="visible">
|
|
|
|
<h2>Sidebar</h2>
|
|
|
|
<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>
|
|
|
|
<template #header>
|
|
|
|
<div class="flex">
|
|
|
|
<button class="p-sidebar-icon p-link mr-2">
|
|
|
|
<span class="pi pi-print" />
|
|
|
|
</button>
|
|
|
|
<button class="p-sidebar-icon p-link mr-2">
|
|
|
|
<span class="pi pi-search" />
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</Sidebar>
|
|
|
|
<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">
|
|
|
|
<Sidebar v-model:visible="visible">
|
|
|
|
<h2>Sidebar</h2>
|
|
|
|
<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>
|
|
|
|
<template #header>
|
|
|
|
<div class="flex">
|
|
|
|
<button class="p-sidebar-icon p-link mr-2">
|
|
|
|
<span class="pi pi-print" />
|
|
|
|
</button>
|
|
|
|
<button class="p-sidebar-icon p-link mr-2">
|
|
|
|
<span class="pi pi-search" />
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</Sidebar>
|
|
|
|
<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>
|