🌐 AI搜索 & 代理 主页
Skip to content

Commit 1737072

Browse files
authored
chore(docs): minor updates to the table docs (#3860)
1 parent c3e1f5c commit 1737072

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

CHANGELOG.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ stable.**
7474
- **tables:** add support for sticky columns
7575
([#3847](https://github.com/bootstrap-vue/bootstrap-vue/issues/3847))
7676
([5b5f2b8](https://github.com/bootstrap-vue/bootstrap-vue/commit/5b5f2b8))
77-
- **b-toast:** add SCSS variable for default toast background opacity + standardize a few BootstrapVue
78-
SCSS variable names ([#3775](https://github.com/bootstrap-vue/bootstrap-vue/issues/3775))
77+
- **b-toast:** add SCSS variable for default toast background opacity + standardize a few
78+
BootstrapVue SCSS variable names
79+
([#3775](https://github.com/bootstrap-vue/bootstrap-vue/issues/3775))
7980
([5799075](https://github.com/bootstrap-vue/bootstrap-vue/commit/5799075))
8081
- **config:** defaults for all `size` properties (closes
8182
[#3805](https://github.com/bootstrap-vue/bootstrap-vue/issues/3805))
@@ -97,12 +98,12 @@ stable.**
9798
formatting) has been changed in this version to use a new square bracketed syntax. While the
9899
previous naming syntax still works, it has been deprecated in favour of the newer naming
99100
convention (which prevents potential slot-name conflicts with fields named `default` and other
100-
table slots). **Users are encouraged to switch to the new table field slot name syntax, as the
101-
old slot name syntax will be removed in 2.0.0 stable release!**
101+
table slots). **Users are encouraged to switch to the new table field slot name syntax, as the old
102+
slot name syntax will be removed in 2.0.0 stable release!**
102103

103-
- Users should switch to the simplified import syntax (introduced in v2.0.0-rc.22) when
104-
importing individual plugins, components, and/or directives. **Importing from the `es/` build
105-
directory has been deprecated and will be removed in 2.0.0 stable release!**
104+
- Users should switch to the simplified import syntax (introduced in v2.0.0-rc.22) when importing
105+
individual plugins, components, and/or directives. **Importing from the `es/` build directory has
106+
been deprecated and will be removed in 2.0.0 stable release!**
106107

107108
<a name="2.0.0-rc.27"></a>
108109

src/components/table/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2381,7 +2381,7 @@ The `<b-table-simple>` component gives the user complete control over the render
23812381
content, while providing basic Bootstrap v4 table styling. `<b-table-simple>` is a wrapper component
23822382
around the `<table>` element. Inside the component, via the `default` slot, you can use any or all
23832383
of the BootstrapVue [table helper components](#table-helper-components): `<b-thead>`, `<b-tfoot>`,
2384-
`<b-tbody>`, `<b-tr>`, `<b-th>`, `<b-td>`, and the HTML5 elements `<caption>` and `<colgroup>` and
2384+
`<b-tbody>`, `<b-tr>`, `<b-th>`, `<b-td>`, and the HTML5 elements `<caption>`, `<colgroup>` and
23852385
`<col>`. Contrary to the component's name, one can create simple or complex table layouts with
23862386
`<b-table-simple>`.
23872387

@@ -2394,7 +2394,7 @@ sticky. See below for more information on using [sticky columns](#simple-tables-
23942394

23952395
Since `b-table-simple` is just a wrapper component, of which you will need to render content inside,
23962396
it does not provide any of the advanced features of `<b-table>` (i.e. row events, head events,
2397-
sorting, pagination, filtering, foot-clone, etc).
2397+
sorting, pagination, filtering, foot-clone, items, fields, etc).
23982398

23992399
```html
24002400
<div>
@@ -2650,24 +2650,24 @@ BootstrapVue provides additional helper child components when using `<b-table-si
26502650
slots `top-row`, `bottom-row`, and `thead-top` (all of which accept table child elements). The
26512651
helper components are as follows:
26522652

2653-
- `b-tbody`
2654-
- `b-thead`
2655-
- `b-tfoot`
2653+
- `b-tbody` (`<b-table-simple>` only)
2654+
- `b-thead` (`<b-table-simple>` only)
2655+
- `b-tfoot` (`<b-table-simple>` only)
26562656
- `b-tr`
26572657
- `b-td`
26582658
- `b-th`
26592659

26602660
These components are optimized to handle converting variants to the appropriate classes (such as
26612661
handling table `dark` mode), and automatically applying certain accessibility attributes (i.e.
2662-
`role`s and `scope`s) and can handle the stacked table and sticky-header requirements. Components
2662+
`role`s and `scope`s). It can generate the stacked table and sticky-header requirements. Components
26632663
`<b-table>` and `<b-table-lite>` use these helper components internally.
26642664

26652665
In the [Simple tables](#simple-tables) example, we are using the helper components `<b-thead>`,
26662666
`<b-tbody>`, `<b-tr>`, `<b-th>`, `<b-tr>` and `<b-tfoot>`. While you can use regular table child
26672667
elements (i.e. `<tbody>`, `<tr>`, `<td>`, etc) within `<b-table-simple>`, and the named slots
26682668
`top-row`, `bottom-row`, and `thead-top`, it is recommended to use these BootstrapVue table `<b-t*>`
2669-
helper components. Note that there are no helper components for `<caption>` or `<colgroup>`+`<col>`,
2670-
so you may these two HTML5 elements directly in `<b-table-simple>`.
2669+
helper components. Note that there are no helper components for `<caption>`, `<colgroup>` or
2670+
`<col>`, so you may these three HTML5 elements directly in `<b-table-simple>`.
26712671

26722672
- Table helper components `<b-tr>`, `<b-td>` and `<b-th>` all accept a `variant` prop, which will
26732673
apply one of the Bootstrap theme colors (custom theme colors are supported via

src/components/table/_table.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,10 @@
104104
// Needed because Bootstrap v4 does not have table child elements set up
105105
// to inherit their background color from parent element by default
106106
//
107-
// An issue or PR should be made at twbs/bootstrap repo for table
108-
// background color inheritance
107+
// An issue made at twbs/bootstrap repo for table
108+
// background color inheritance:
109+
// https://github.com/twbs/bootstrap/issues/29244
110+
// If implemented, would negate the need for all the below SCSS
109111
.table.b-table {
110112
> thead,
111113
> tbody,

0 commit comments

Comments
 (0)