[TOC] ## 安装 jquery ``` npm install jquery ``` vue.config.js` ``` const webpack = require("webpack"); module.exports = { configureWebpack: { plugins: [ new webpack.ProvidePlugin({ $: "jquery", jQuery: "jquery", "window.jQuery": "jquery", Popper: ["popper.js", "default"] }) ] } }; ``` `main.js` 中 ``` new Vue({ router, store, $, render: h => h(App) }).$mount("#app"); ``` 在 `*.vue`局部中 ``` import $ from "jquery"; ``` ## 安装 bootstrap ``` npm install bootstrap@3 ``` 在 `main.js` 或`*.vue` 中 ``` import "bootstrap/dist/css/bootstrap.css"; import "bootstrap/dist/js/bootstrap.min.js"; ```