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.
35 lines
850 B
35 lines
850 B
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])
|
|
})
|
|
}
|
|
}
|
|
};
|
|
}); |