🌐 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: 2 additions & 3 deletions src/components/table/helpers/mixin-caption.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ export const captionMixin = Vue.extend({
props,
computed: {
captionId() {
// Even though `this.safeId` looks like a method, it is a computed prop
// that returns a new function if the underlying ID changes
return this.isStacked ? this.safeId('_caption_') : null
}
},
Expand All @@ -38,7 +36,8 @@ export const captionMixin = Vue.extend({
{
attrs: { id: this.captionId },
domProps: hasCaptionSlot ? {} : htmlOrText(captionHtml, caption),
key: 'caption'
key: 'caption',
ref: 'caption'
},
this.normalizeSlot(SLOT_NAME_TABLE_CAPTION)
)
Expand Down
9 changes: 3 additions & 6 deletions src/components/table/helpers/mixin-table-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,14 @@ export const tableRendererMixin = Vue.extend({
selectableTableAttrs
} = this

// Preserve user supplied aria-describedby, if provided in `$attrs`
const adb =
[(this.bvAttrs || {})['aria-describedby'], this.captionId].filter(identity).join(' ') ||
null

const ariaAttrs = this.isTableSimple
? {}
: {
'aria-busy': this.computedBusy ? 'true' : 'false',
'aria-colcount': toString(fields.length),
'aria-describedby': adb
// Preserve user supplied `aria-describedby`, if provided
'aria-describedby':
this.bvAttrs['aria-describedby'] || this.$refs.caption ? this.captionId : null
}

const rowCount =
Expand Down