Introduce jquery first
1. Use the command first:
npm install jquery --save-dev
2. In (if it is a development [dev] environment, then in;
Both files are in the bulid directory;
Please be sure to note that when I was operating, I found the wrong file and didn't get it right for a long time;) Add the following content:
const webpack = require('webpack') plugins:[ new ({ $: "jquery", jQuery: "jquery" }), ]
3. Registering
import $ from ‘jquery'
At this point, the introduction of jquery is over. Let’s see how to introduce traditional bootStrap
Introducing BootStrap
1.Using instructions:
npm install bootstrap --save-dev
2. After the installation is successful, you can see the bootstrap module in the folder.
At this time, you need to add the following content:
import 'bootstrap/dist/css/' import 'bootstrap/dist/js/'
At this point, bootStrap has also ended. Next, our focus is, because BootStrap and VUE have a special design called, so after we introduce it, we can directly use the proprietary styles they provide, which is much better than native bootStrap.
1.Using instructions:
npm i vue bootstrap-vue bootstrap
2. Add in the file:
import Vue from 'vue' import BootstrapVue from 'bootstrap-vue' import 'bootstrap/dist/css/' import 'bootstrap-vue/dist/' (BootstrapVue)
All citations are over so far
Summarize
The above is personal experience. I hope you can give you a reference and I hope you can support me more.