您好,欢迎来到优茬娱乐网。
搜索
您的当前位置:首页vue中怎么引入bootstrap

vue中怎么引入bootstrap

来源:优茬娱乐网


一、引入jquery

步骤:

1. 安装jquery

$ npm install jquery --save-dev

2.在webpack.config.js 添加内容

+ const webpack = require("webpack");
module.exports = {
 entry: './index.js',
 output: {
 path: path.join(__dirname, './dist'),
 publicPath: '/dist/',
 filename: 'index.js'
 },
 + plugins: [
 new webpack.ProvidePlugin({
 jQuery: 'jquery',
 $: 'jquery'
 })
 ]
}

3.在入口文件index.js 里面添加内容

import $ from 'jquery' ;

Copyright © 2019- ucpa.cn 版权所有

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务