-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5aeef71
commit 4645de4
Showing
2 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<template> | ||
<DocSectionText v-bind="$attrs"> | ||
<p>Headless mode is enabled by defining a <i>container</i> slot that lets you implement entire UI instead of the default elements.</p> | ||
</DocSectionText> | ||
<div class="card"> | ||
<Paginator :rows="10" :totalRecords="120"> | ||
<template #container="{ first, last, prevCallback, nextCallback, totalRecords }"> | ||
<div class="flex items-center gap-2"> | ||
<Button icon="pi pi-chevron-left" severity="secondary" text @click="prevCallback" /> | ||
<div>Showing {{ first }} to {{ last }} of {{ totalRecords }}</div> | ||
<Button icon="pi pi-chevron-right" severity="secondary" text @click="nextCallback" /> | ||
</div> | ||
</template> | ||
</Paginator> | ||
</div> | ||
<DocSectionCode :code="code" /> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data() { | ||
return { | ||
code: { | ||
basic: ` | ||
<Paginator :rows="10" :totalRecords="120"> | ||
<template #container="{ first, last, prevCallback, nextCallback, totalRecords }"> | ||
<div class="flex items-center gap-2"> | ||
<Button icon="pi pi-chevron-left" severity="secondary" text rounded @click="prevCallback" /> | ||
<div>Showing {{ first }} to {{ last }} of {{ totalRecords }}</div> | ||
<Button icon="pi pi-chevron-right" severity="secondary" text rounded @click="nextCallback" /> | ||
</div> | ||
</template> | ||
</Paginator> | ||
`, | ||
options: ` | ||
<template> | ||
<div class="card"> | ||
<Paginator :rows="10" :totalRecords="120"> | ||
<template #container="{ first, last, prevCallback, nextCallback, totalRecords }"> | ||
<div class="flex items-center gap-2"> | ||
<Button icon="pi pi-chevron-left" severity="secondary" text rounded @click="prevCallback" /> | ||
<div>Showing {{ first }} to {{ last }} of {{ totalRecords }}</div> | ||
<Button icon="pi pi-chevron-right" severity="secondary" text rounded @click="nextCallback" /> | ||
</div> | ||
</template> | ||
</Paginator> | ||
</div> | ||
</template> | ||
<script> | ||
<\/script> | ||
`, | ||
composition: ` | ||
<template> | ||
<div class="card"> | ||
<Paginator :rows="10" :totalRecords="120"> | ||
<template #container="{ first, last, prevCallback, nextCallback, totalRecords }"> | ||
<div class="flex items-center gap-2"> | ||
<Button icon="pi pi-chevron-left" severity="secondary" text rounded @click="prevCallback" /> | ||
<div>Showing {{ first }} to {{ last }} of {{ totalRecords }}</div> | ||
<Button icon="pi pi-chevron-right" severity="secondary" text rounded @click="nextCallback" /> | ||
</div> | ||
</template> | ||
</Paginator> | ||
</div> | ||
</template> | ||
<script setup> | ||
<\/script> | ||
` | ||
} | ||
}; | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters