【问题标题】:NuxtJS + BootstrapVue + TailwindCSS: Can I efficiently use Bootstrap Vue components but style with Tailwind CSS?NuxtJS + BootstrapVue + TailwindCSS:我可以有效地使用 Bootstrap Vue 组件,但使用 Tailwind CSS 样式?
【发布时间】:2021-05-21 21:36:58
【问题描述】:

我正在创建一个应用程序,并在大部分设计中使用 Tailwind CSS。但是,我想使用 BootstrapVue 中的几个组件。

是否可以将某些组件(例如Form Tags component)作为插件导入?如果是这样,我该如何优化它,以便我可以在 NuxtJS 中获得最小的文件?是否可以使用所有 BootstrapVue 表单组件但使用 Tailwind CSS 设置样式?

如果您能提供一种用于摇树、导入等的最佳方法,那就太棒了!

【问题讨论】:

    标签: nuxt.js bootstrap-vue


    【解决方案1】:

    是的,您可以基于documentation在nuxt中使用bootstrap-vue中的抖动

    我在我的项目中nuxt.config.js文件中使用了这个方法:

    bootstrapVue: {
        icons: false,
        componentPlugins: [
            'LayoutPlugin',
            'FormPlugin',
        ],
        components: ['BContainer', 'BRow', 'BCol' ],
        directives: ['VBModal', 'VBToggle', 'VBTooltip'],
    },
    

    当然,你可以在配置文件中放任何你想要的东西。

    【讨论】:

      猜你喜欢
      • 2020-10-11
      • 2020-05-09
      • 2018-08-19
      • 1970-01-01
      • 2020-10-22
      • 2021-11-10
      • 1970-01-01
      • 2018-11-28
      • 2021-09-25
      相关资源
      最近更新 更多