BootstrapVue渲染的nuxt元素外部的模态开口

问题描述 投票:0回答:1

我正在将BootstrapVue与通用Nuxtjs一起使用。

问题是;当我单击按钮时,b模态元素在主体底部打开,而不是在渲染的“ _nuxt” div内部。因此,我无法为模态元素设置适当的位置。也许我想在单击该区域的地方打开一个模态元素。

但是,引导程序也不像那样。

让我们用屏幕快照证明它。

这是用nuxtjs开发的新的boostrap-vue.org

this is new boostrap-vue.org which developed with nuxtjs

这是getboostrap.org,在单击区域显示了模态

and this is getboostrap.org, modal rendered where clicked area

最后,如果我的记忆正确。普通的Vue和BootstrapVue的行为不一样。

感谢您的耐心等待:)

javascript vuejs2 bootstrap-modal nuxt.js bootstrap-vue
1个回答
0
投票

Bootstrap-Vue默认在body的底部渲染模态。

如果要在文档中放置模态,请应用static属性。

更多信息:https://bootstrap-vue.org/docs/components/modal#lazy-loading-and-static-modals

© www.soinside.com 2019 - 2024. All rights reserved.