在nuxt.config.js中的布局中添加模块而不是globaly

发布于 2025-02-11 04:41:30 字数 121 浏览 1 评论 0原文

如何在NUXT中的布局中添加一个模块,并与相同的布局及其页面和组件一起使用? 我有拖曳布局。其中一个应该与某些组件一起使用“ bootstrap-vue”,而另一个组件则可以使用。 特别是对于Vue-Bootstrap。提前提前

How can I add a module in a layout in nuxt and it works with the same layout and its pages and components?
I have tow layouts. One of them should work with "bootstrap-vue" with some component and another should work without that.
especially for vue-bootstrap. thx in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

幽梦紫曦~ 2025-02-18 04:41:30

我发现解决方案也许对其他解决方案很有用。
我在布局中添加了Bootstrap-vue。
如果需要,您可以添加更多插件或整个软件包。
所需的一些软件包

import Vue from 'vue'
import 'bootstrap/dist/css/bootstrap.css'
import { LayoutPlugin, NavbarPlugin,CardPlugin,BAlert } from 'bootstrap-vue'
Vue.use(LayoutPlugin)
Vue.use(NavbarPlugin)
Vue.use(CardPlugin)

我可以做的所有bootstrap-vue

import Vue from 'vue'
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
Vue.use(BootstrapVue)
Vue.use(IconsPlugin)

I found the solution maybe it is useful for the others.
I added bootstrap-vue like this to my layout.
You can add more plugins if you want or the whole package.
some packages that I needed

import Vue from 'vue'
import 'bootstrap/dist/css/bootstrap.css'
import { LayoutPlugin, NavbarPlugin,CardPlugin,BAlert } from 'bootstrap-vue'
Vue.use(LayoutPlugin)
Vue.use(NavbarPlugin)
Vue.use(CardPlugin)

for all bootstrap-vue you can do like this

import Vue from 'vue'
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
Vue.use(BootstrapVue)
Vue.use(IconsPlugin)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文