Vue項(xiàng)目如何引入bootstrap、elementUI、echarts
引入bootstrap
安裝依賴(lài)包
cnpm install bootstrap --save-devcnpm install jquery --save-devcnpm install popper.js --save-dev
全局引入
在項(xiàng)目中根目錄下的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
打開(kāi)終端,輸入以下內(nèi)容
npm i element-ui -S
全局引入
在項(xiàng)目中根目錄下的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
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持好吧啦網(wǎng)。
相關(guān)文章:
1. ASP基礎(chǔ)知識(shí)VBScript基本元素講解2. Kotlin + Flow 實(shí)現(xiàn)Android 應(yīng)用初始化任務(wù)啟動(dòng)庫(kù)3. ajax請(qǐng)求添加自定義header參數(shù)代碼4. IntelliJ IDEA導(dǎo)入jar包的方法5. Python requests庫(kù)參數(shù)提交的注意事項(xiàng)總結(jié)6. 詳談ajax返回?cái)?shù)據(jù)成功 卻進(jìn)入error的方法7. 使用python 計(jì)算百分位數(shù)實(shí)現(xiàn)數(shù)據(jù)分箱代碼8. 使用Python和百度語(yǔ)音識(shí)別生成視頻字幕的實(shí)現(xiàn)9. vue-electron中修改表格內(nèi)容并修改樣式10. python操作mysql、excel、pdf的示例
