Repeater
The r-repeater
is an abstract component for rendering tabular data with ease and flexibility in your applications.
Usage
import { RRepeater } from "@rebilly/revel";
<r-repeater :provider="[{id: 1, name: 'John'}]">
<template #headers>
<th>ID</th>
<th>Name</th>
</template>
<template #default="{ item }">
<tr>
<td>{{ item.id }}</td>
<td>{{ item.name }}</td>
</tr>
</template>
</r-repeater>
Example
Name | Type | Default | Description |
---|---|---|---|
provider | union, Array, TSParenthesizedType, Promise | Returns some data to be rendered by the default scoped slot | |
isLoaderFullscreen | boolean | true | Defines if the loading state is fullscreen |
isLoaderSpinner | boolean | false | Defines if the loading is displayed as a spinner |
watcher | object | () => ({}) | Defines the property, which changes will trigger the fetching of data |
Name | Description |
---|---|
colgroup | Content for colgroups - see HTML <colgroup> |
thead | Content for thead - see HTML <thead> |
headers | Specify the <th> of your table, rather than the whole thead |
default | Content for tr - see HTML <tr> |
empty | Empty state (if the provider function returns no data) |