Skip to content

Commit f59941d

Browse files
committed
Improvement - VueUiDashboard - Add 'top' and 'bottom' slots
1 parent 1f547ad commit f59941d

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ From the dataset you pass into the props, this component will produce the most a
496496
| `VueUiAccordion` || `VueUiAccordionConfig` || `#arrow`, `#title`, `#content` |
497497
| `VueUiAnnotator` | `VueUiAnnotatorDataset` | `VueUiAnnotatorConfig` | `@toggleOpenState`, `@saveAnnotations` ||
498498
| `VueUiCursor` || `VueUiCursorConfig` |||
499-
| `VueUiDashboard` | `VueUiDashboardElement[]` | `VueUiDashboardConfig` | `@change` | `#content` |
499+
| `VueUiDashboard` | `VueUiDashboardElement[]` | `VueUiDashboardConfig` | `@change` | `#content`, `#top`, `#bottom` |
500500
| `VueUiDigits` | `number` | `VueUiDigitsConfig` |||
501501
| `VueUiKpi` | `number` | `VueUiKpiConfig` || `#title`, `#value`, `#comment-before`, `#comment-after` |
502502
| `VueUiMiniLoader` || `VueUiMiniLoaderConfig` |||

documentation/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ From the dataset you pass into the props, this component will produce the most a
214214
| `VueUiAccordion` || `VueUiAccordionConfig` || `#arrow`, `#title`, `#content` |
215215
| `VueUiAnnotator` | `VueUiAnnotatorDataset` | `VueUiAnnotatorConfig` | `@toggleOpenState`, `@saveAnnotations` ||
216216
| `VueUiCursor` || `VueUiCursorConfig` |||
217-
| `VueUiDashboard` | `VueUiDashboardElement[]` | `VueUiDashboardConfig` | `@change` | `#content` |
217+
| `VueUiDashboard` | `VueUiDashboardElement[]` | `VueUiDashboardConfig` | `@change` | `#content`, `#top`, `#bottom` |
218218
| `VueUiDigits` | `number` | `VueUiDigitsConfig` |||
219219
| `VueUiKpi` | `number` | `VueUiKpiConfig` || `#title`, `#value`, `#comment-before`, `#comment-after` |
220220
| `VueUiMiniLoader` || `VueUiMiniLoaderConfig` |||

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@
110110
"vitest": "^3.1.1",
111111
"vue": "^3.5.14"
112112
}
113-
}
113+
}

src/TestingArena.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5507,8 +5507,15 @@ function testGetData() {
55075507
@change="testchange"
55085508
:config="dashboardConfig"
55095509
>
5510+
<template #top="{ item }">
5511+
TOP CONTENT
5512+
</template>
5513+
<template #bottom="{ item }">
5514+
BOTTOM CONTENT
5515+
</template>
55105516
<template v-slot:content="{ item }">
55115517
<div style="padding: 12px">
5518+
LOREM IPSUM
55125519
<component :is="item.component" v-bind="item.props"></component>
55135520
</div>
55145521
</template>

src/components/vue-ui-dashboard.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,8 @@ defineExpose({
444444
@touchend="onTouchEnd"
445445
></div>
446446
</template>
447+
448+
<slot name="top" :item="item" :index="index"/>
447449

448450
<component
449451
:is="item.resolvedComponent"
@@ -453,6 +455,8 @@ defineExpose({
453455
<template v-else>
454456
<slot name="content" :item="item" :index="index" :left="item.left" :top="item.top" :height="item.height" :width="item.width"></slot>
455457
</template>
458+
459+
<slot name="bottom" :item="item" :index="index"/>
456460
</div>
457461
</div>
458462
</div>

0 commit comments

Comments
 (0)