diff --git a/docs/components/content/examples/TableExampleCaptionSlot.vue b/docs/components/content/examples/TableExampleCaptionSlot.vue new file mode 100644 index 0000000000..ead85e4c39 --- /dev/null +++ b/docs/components/content/examples/TableExampleCaptionSlot.vue @@ -0,0 +1,63 @@ + + + diff --git a/docs/content/2.components/table.md b/docs/content/2.components/table.md index f747feff21..630681758c 100644 --- a/docs/content/2.components/table.md +++ b/docs/content/2.components/table.md @@ -450,6 +450,19 @@ componentProps: --- :: +### `caption` + +Use the `#caption` slot to customize the table's caption. + +::component-example +--- +padding: false +component: 'table-example-caption-slot' +componentProps: + class: 'flex-1' +--- +:: + ## Props :component-props diff --git a/src/runtime/components/data/Table.vue b/src/runtime/components/data/Table.vue index e85c0ecbc1..08b6eb9b14 100644 --- a/src/runtime/components/data/Table.vue +++ b/src/runtime/components/data/Table.vue @@ -1,6 +1,11 @@