In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to introduce Bootstrap into Vue projects. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Introducing Bootstrap into Vue projects
Sometimes Bootstrap is introduced according to the requirements in the vue project, and Bootstrap depends on jQuery, so a series of errors may occur when using npm installation
1. Install jQuery
Npm install jquery
2. Install Bootstrap
Npm install bootstrap@3
In the above two steps, you can also specify the version number in the package.json configuration file, and then run npm install
After the installation, the project will not run. Although both of them have been successfully installed, the error "Bootstrap's JavaScript requires jQuery npm" will still be reported. To solve this problem, you can introduce it in the main.js entry file as follows:
Import $from 'jquery'window.jQuery = $require (' bootstrap')
Next, in order to be able to use the style of Bootstrap, you can introduce bootstrap.css in the portal file. This is the same way to introduce Element UI.
Import 'bootstrap/dist/css/bootstrap.min.css' Thank you for your reading! This is the end of the article on "how to introduce Bootstrap into the Vue project". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.