I have used Vuejs for developing my frontend and now I have to style it. I came across Bootstrap-vue . Which will be better to use Bootstrap 4 or Bootstrap-vue. Are they same or is there is an advantage to use Bootstap-vue.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Some Bootstrap 4 functions require jQuery, Popper.js, and these functions will conflict with Vue. (These functions modify the DOM directly. Vue won't keep track of these modifications. Any changes made using jQuery could be overwritten by Vue.)
These functions include:
- Affix
- Alert
- Button
- Carousel
- Collapse
- Dropdown
- Modal
- Popover
- Scrollspy
- Tab
- Tooltip
Bootstrap-vue
converted most of these functions into Vue, so that it works as expected.
If you only want to use Bootstrap CSS and not its JS related functions, using Bootstrap 4
directly will be more straight forward and requires less time spent learning how Bootstrap-vue
works.
Else, use Bootstrap-vue
.
If you are not sure, Bootstrap-vue
seems like a less risky choice.