🌐 AI搜索 & 代理 主页
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/table/tbody.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ export const props = {
}
}

// TODO:
// In Bootstrap v5, we won't need "sniffing" as table element variants properly inherit
// to the child elements, so this can be converted to a functional component
// @vue/component
export const BTbody = /*#__PURE__*/ Vue.extend({
name: 'BTbody',
Expand Down Expand Up @@ -60,7 +63,7 @@ export const BTbody = /*#__PURE__*/ Vue.extend({
// background color inheritance with Bootstrap v4 table CSS
return !this.isStacked && this.bvTable.stickyHeader
},
tableVariant() /* istanbul ignore next: Not currently sniffed in tests */ {
tableVariant() {
// Sniffed by <b-tr> / <b-td> / <b-th>
return this.bvTable.tableVariant
},
Expand Down
11 changes: 7 additions & 4 deletions src/components/table/td.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ export const props = {
}
}

// TODO:
// In Bootstrap v5, we won't need "sniffing" as table element variants properly inherit
// to the child elements, so this can be converted to a functional component
// @vue/component
export const BTd = /*#__PURE__*/ Vue.extend({
name: 'BTableCell',
Expand Down Expand Up @@ -104,8 +107,7 @@ export const BTd = /*#__PURE__*/ Vue.extend({
headVariant() {
return this.bvTableTr.headVariant
},
/* istanbul ignore next: need to add in tests for footer variant */
footVariant() /* istanbul ignore next: need to add in tests for footer variant */ {
footVariant() {
return this.bvTableTr.footVariant
},
tableVariant() {
Expand All @@ -120,11 +122,12 @@ export const BTd = /*#__PURE__*/ Vue.extend({
cellClasses() {
// We use computed props here for improved performance by caching
// the results of the string interpolation
// TODO: need to add handling for footVariant
let variant = this.variant
if (
(!variant && this.isStickyHeader && !this.headVariant) ||
(!variant && this.isStickyColumn)
(!variant && this.isStickyColumn && this.inTfoot && !this.footVariant) ||
(!variant && this.isStickyColumn && this.inThead && !this.headVariant) ||
(!variant && this.isStickyColumn && this.inTbody)
) {
// Needed for sticky-header mode as Bootstrap v4 table cells do
// not inherit parent's background-color. Boo!
Expand Down
7 changes: 5 additions & 2 deletions src/components/table/tfoot.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ export const props = {
}
}

// TODO:
// In Bootstrap v5, we won't need "sniffing" as table element variants properly inherit
// to the child elements, so this can be converted to a functional component
// @vue/component
export const BTfoot = /*#__PURE__*/ Vue.extend({
name: 'BTfoot',
Expand All @@ -33,7 +36,7 @@ export const BTfoot = /*#__PURE__*/ Vue.extend({
// Sniffed by <b-tr> / <b-td> / <b-th>
return true
},
isDark() /* istanbul ignore next: Not currently sniffed in tests */ {
isDark() {
// Sniffed by <b-tr> / <b-td> / <b-th>
return this.bvTable.dark
},
Expand All @@ -56,7 +59,7 @@ export const BTfoot = /*#__PURE__*/ Vue.extend({
// background color inheritance with Bootstrap v4 table CSS
return !this.isStacked && this.bvTable.stickyHeader
},
tableVariant() /* istanbul ignore next: Not currently sniffed in tests */ {
tableVariant() {
// Sniffed by <b-tr> / <b-td> / <b-th>
return this.bvTable.tableVariant
},
Expand Down
3 changes: 3 additions & 0 deletions src/components/table/th.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import Vue from '../../utils/vue'
import { BTd } from './td'

// TODO:
// In Bootstrap v5, we won't need "sniffing" as table element variants properly inherit
// to the child elements, so this can be converted to a functional component
// @vue/component
export const BTh = /*#__PURE__*/ Vue.extend({
name: 'BTh',
Expand Down
3 changes: 3 additions & 0 deletions src/components/table/thead.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ export const props = {
}
}

// TODO:
// In Bootstrap v5, we won't need "sniffing" as table element variants properly inherit
// to the child elements, so this can be converted to a functional component
// @vue/component
export const BThead = /*#__PURE__*/ Vue.extend({
name: 'BThead',
Expand Down
3 changes: 3 additions & 0 deletions src/components/table/tr.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export const props = {
const LIGHT = 'light'
const DARK = 'dark'

// TODO:
// In Bootstrap v5, we won't need "sniffing" as table element variants properly inherit
// to the child elements, so this can be converted to a functional component
// @vue/component
export const BTr = /*#__PURE__*/ Vue.extend({
name: 'BTr',
Expand Down