🌐 AI搜索 & 代理 主页
Skip to content
Merged
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
9 changes: 9 additions & 0 deletions src/components/toast/toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,14 @@ export const BToast = /*#__PURE__*/ Vue.extend({
return h()
}
const name = `b-toast-${this._uid}`
const $parent = this.$parent
// If scoped styles are applied, and the toast is not static,
// Make sure hte scoped style data attribute is applied
const scopeAttrs =
!this.static && $parent && $parent.$options._scopeId
? { [`${[$parent.$options._scopeId]}`]: '' }
: {}

return h(
Portal,
{
Expand All @@ -427,6 +435,7 @@ export const BToast = /*#__PURE__*/ Vue.extend({
staticClass: 'b-toast',
class: this.bToastClasses,
attrs: {
...scopeAttrs,
id: this.safeId('_toast_outer'),
role: this.isHiding ? null : this.isStatus ? 'status' : 'alert',
'aria-live': this.isHiding ? null : this.isStatus ? 'polite' : 'assertive',
Expand Down