前端笔记-vue中引入Bootstrap
生活随笔
收集整理的這篇文章主要介紹了
前端笔记-vue中引入Bootstrap
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
目錄
?
過程演示
源碼打包下載
過程演示
首先在項目中導入插件:
npm install jquery --save npm install bootstrap --save npm install popper.js --save程序結構如下:
index.js中添加如下代碼
import '../../node_modules/bootstrap/dist/css/bootstrap.css'; import '../../node_modules/bootstrap/dist/js/bootstrap.js';webpack.bas.config.js中添加如下代碼:
const webpack = require('webpack') module.exports = {............,plugins: [new webpack.ProvidePlugin({$: "jquery",jQuery: "jquery"})] }HellWorld.vue中使用展示:
<template><div class="hello"><h1>{{ msg }}</h1><button class="btn btn-primary" @click="go">點我跳轉</button></div> </template>程序運行截圖如下:
?
?
源碼打包下載
https://github.com/fengfanchen/frontUI
總結
以上是生活随笔為你收集整理的前端笔记-vue中引入Bootstrap的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C++笔记-shared_ptr与wea
- 下一篇: html5倒计时秒杀怎么做,vue 设