vue2.x emoji plugin, autoload fontawesome
Vue2.x emoji plugin and autoload fontawesome(^4.7.0) and bootstrap(^3.2.x)
# install
$ npm install vuejs-emoji --save
# install
$ npm install -g vue-cli
$ vue init webpack my-project
import Vue2Emoji from 'vuejs-emoji'
Vue.use(Vue2Emoji)
<emoji-icon @select="selectIcon", :iconConfig="iconConfig"></emoji-icon>
<div v-html="val"></div>
var iconConfig = {
placement: 'top',
size: '30px',
name: 'fa-send', // font awesome icon name
color: '#fff' // icon color: hex、rgb or rgba value
}
Detail IconConfig
key | default | type | intro | |
---|---|---|---|---|
placement | ‘top’ | String | ‘top’、’left’、’right’、’bottom’ | |
size | ‘30px’ | String | also can use rem, eg: ‘1rem’ | |
name | ‘fa-smile-o’ | String | just use font awesome icon name | |
color | ‘#278dff’ | String | can use hex、rgb、rgba value |