diff --git a/docs/components/content/examples/TableExampleEmptySlot.vue b/docs/components/content/examples/TableExampleEmptySlot.vue new file mode 100644 index 00000000..d4b4cf29 --- /dev/null +++ b/docs/components/content/examples/TableExampleEmptySlot.vue @@ -0,0 +1,30 @@ + + + diff --git a/docs/content/4.data/1.table.md b/docs/content/4.data/1.table.md index 96334f23..374045d8 100644 --- a/docs/content/4.data/1.table.md +++ b/docs/content/4.data/1.table.md @@ -482,6 +482,39 @@ const selected = ref([people[1]]) ``` :: +### `empty-state` + +Use the `#empty-state` slot to customize the empty state. + +::component-example{class="grid"} +--- +padding: false +overflowClass: 'overflow-x-auto' +--- + +#default +:table-example-empty-slot{class="flex-1"} + +#code +```vue + + + +``` +:: + ## Props :component-props diff --git a/src/runtime/components/data/Table.vue b/src/runtime/components/data/Table.vue index 9a197f39..f0b9a292 100644 --- a/src/runtime/components/data/Table.vue +++ b/src/runtime/components/data/Table.vue @@ -36,12 +36,14 @@ -
-
+ +
+
+