Vue项目如何引入bootstrap、elementUI、echarts
引入bootstrap
安装依赖包
cnpm install bootstrap --save-devcnpm install jquery --save-devcnpm install popper.js --save-dev
全局引入
在项目中根目录下的main.js中添加如下代码:
import ’bootstrap’import $ from ’jquery’
在vue文件中引用
<script>import ’bootstrap/dist/css/bootstrap.min.css’import ’bootstrap/dist/js/bootstrap.min.js’</script>
引入elementUI
安装 elementUI
打开终端,输入以下内容
npm i element-ui -S
全局引入
在项目中根目录下的main.js中添加如下代码:
import ElementUI from ’element-ui’import ’element-ui/lib/theme-chalk/index.css’;Vue.use(ElementUI)
引入echarts
安装echarts
npm install echarts -S
2.全局引入main.js
// 引入echartsimport echarts from ’echarts’Vue.prototype.$echarts = echarts
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持好吧啦网。
相关文章:
1. 浅谈Python中的函数(def)及参数传递操作2. PHP里10个鲜为人知但却非常有用的函数3. 详解python第三方库的安装、PyInstaller库、random库4. Python搭建Keras CNN模型破解网站验证码的实现5. iOS UIScrollView和控制器返回手势冲突解决方法6. Android Studio编写AIDL文件后如何实现自动编译生成7. 解决python脚本中error: unrecognized arguments: True错误8. Java Bean与Map之间相互转化的实现方法9. python算的上脚本语言吗10. Java 并行数据处理和性能分析