vue中使用bootstrap,需要在vue.config.js中的plugins中进行配置

 + npm i jquery -S
    + 在vue.config.js文件中添加代码
        const webpack = require("webpack");

        module.exports = {
            configureWebpack: {
                plugins: [
                    new webpack.ProvidePlugin({
                    $: "jquery",
                    jQuery: "jquery",
                    "window.jQuery": "jquery",
                    Popper: ["popper.js", "default"]
                    })
                ]
            }
        };
    + npm i bootstrap@3 -S
    + 再main.js中引入 
        import "bootstrap";
        import "bootstrap/dist/css/bootstrap.css";

相关文章:

  • 2021-09-29
  • 2022-02-18
  • 2021-12-09
  • 2022-02-03
  • 2022-12-23
  • 2021-06-07
  • 2021-11-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-25
相关资源
相似解决方案