🌐 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
10 changes: 9 additions & 1 deletion src/components/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -987,13 +987,21 @@ export const BModal = /*#__PURE__*/ Vue.extend({
}
backdrop = h(BVTransition, { props: { noFade: this.noFade } }, [backdrop])

// If the parent has a scoped style attribute, and the modal
// is portalled, add the scoped attribute to the modal wrapper
const $parent = this.$parent
const scopeAttrs =
!this.static && $parent && $parent.$options._scopeId
? { [`${[$parent.$options._scopeId]}`]: '' }
: {}

// Assemble modal and backdrop in an outer <div>
return h(
'div',
{
key: `modal-outer-${this._uid}`,
style: this.modalOuterStyle,
attrs: { ...this.$attrs, id: this.safeId('__BV_modal_outer_') }
attrs: { ...scopeAttrs, ...this.$attrs, id: this.safeId('__BV_modal_outer_') }
},
[modal, backdrop]
)
Expand Down