https://github.com/lpreterite/vue-sina-emotion
新浪表情面板的vue组件
https://github.com/lpreterite/vue-sina-emotion
Last synced: about 2 months ago
JSON representation
新浪表情面板的vue组件
- Host: GitHub
- URL: https://github.com/lpreterite/vue-sina-emotion
- Owner: lpreterite
- License: mit
- Created: 2017-04-26T02:53:59.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-30T08:38:00.000Z (almost 8 years ago)
- Last Synced: 2025-03-23T20:22:29.193Z (2 months ago)
- Language: JavaScript
- Size: 159 KB
- Stars: 11
- Watchers: 2
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vue-sina-emotion
> 新浪表情面板的vue组件
## how to use
### setup
```
npm install lpreterite/vue-sina-emotion
```### use
```
# js
import Vue from 'vue';
import VueSinaEmotion from 'vue-sina-emotion';
// or import no babel code
// import VueSinaEmotion from 'vue-sina-emotion/src/';
Vue.component('vue-sina-emotion', VueSinaEmotion);var vm = new Vue({
el: '#app',
data: function(){
return {
emotions: [],
emotion: '[表情]',
emotionsMap: {}
}
},
methods: {
map: function(data){
this.emotionsMap = data;
}
}
})# html
{{ emotion }}
#emotion modal
{
"phrase": "[坏笑]",
"type": "face",
"url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/50/pcmoren_huaixiao_org.png",
"hot": false,
"common": true,
"category": "",
"icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/50/pcmoren_huaixiao_thumb.png",
"value": "[坏笑]",
"picid": ""
}```
more see **example**### style
```
.sina-emotion-panel{}
.sina-emotion-panel__header{}
.sina-emotion-panel__content{}
.sina-emotion-panel__footer{}.sina-emotion-panel .btn{ /** <,>,prev,next button style **/ }
.sina-emotion-panel .tabs{}
.sina-emotion-panel .tabs__item{}
.sina-emotion-panel .tabs__item--action{}
.sina-emotion-panel .tabsTools{}
.sina-emotion-panel .tabsToolsButton{}
```## Dev
```
# install dependencies
npm install# serve with hot reload at localhost:8081
npm run dev# build for production with minification
npm run build# run mock serve
npm run mock
```## Change Log
### 0.1.1
remove props map function, fix format source to data in init