Vue:插件依赖

sass

npm install node-sass sass-loader --save-dev

Sass中文网

Sass语法

Axios

npm install axios --save-dev

axios-简书

mint-ui

npm install mint-ui --save-dev
import Mint from 'mint-ui';
Vue.use(Mint);

在需要使用的页面引入样式

<!-- 引入样式 -->
import 'mint-ui/lib/style.css';

mint-ui

饿了么全家桶

font awesome

npm i --save @fortawesome/fontawesome
npm i --save @fortawesome/vue-fontawesome
npm i --save @fortawesome/fontawesome-free-solid
npm i --save @fortawesome/fontawesome-free-regular
npm i --save @fortawesome/fontawesome-free-brands

main.js中引入:

import fontawesome from '@fortawesome/fontawesome'
import FontAwesomeIcon from '@fortawesome/vue-fontawesome'
import solid from '@fortawesome/fontawesome-free-solid'
import regular from '@fortawesome/fontawesome-free-regular'
import brands from '@fortawesome/fontawesome-free-brands'

fontawesome.library.add(solid)
fontawesome.library.add(regular)
fontawesome.library.add(brands)

Vue.component('font-awesome-icon', FontAwesomeIcon)
<!-- 官网给定的图标样式是: <i class="fab fa-accessible-icon"></i>-->
<font-awesome-icon :icon="['fas','user]"/>

Vue 使用 Font Awesome 5

图标库

如果在vue项目中,数据和语法没有错误,但是页面还是显示不正确,这时可以考虑是不是需要setTimeout一下

Last modification:April 14th, 2018 at 08:23 pm
If you think my article is useful to you, please feel free to appreciate

Leave a Comment