You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
zhishifufei_php/public/kefu-assets/components/pc/emoji/index.js

35 lines
850 B

10 months ago
define([
'text!./index.html',
'css!./index.css'
], function (template) {
return {
template,
name: 'emoji',
data() {
return {
emojiData: data,
pannels: ['表情', '自然', '物品', '地点', '符号'],
activeIndex: 0
}
},
methods: {
changeActive(index) {
this.activeIndex = index
},
getPureName(name) {
return name.replace(/:/g, '')
},
selectItem(emoji) {
this.$emit('select', emoji)
}
},
computed: {
emojis() {
return this.pannels.map(item => {
return Object.keys(this.emojiData[item])
})
}
}
};
});