2019-03-29 15:49:32 +00:00
|
|
|
<template>
|
2019-08-12 11:20:08 +00:00
|
|
|
<div class="emoji-picker panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<span class="emoji-tabs">
|
|
|
|
<span
|
|
|
|
v-for="(value, key) in emojis"
|
|
|
|
:key="key"
|
|
|
|
class="emoji-tabs-item"
|
|
|
|
:class="{'active': activeGroup === key}"
|
|
|
|
:title="value.text"
|
|
|
|
@click.prevent="highlight(key)"
|
|
|
|
>
|
|
|
|
<i :class="value.icon" />
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<span class="additional-tabs">
|
|
|
|
<slot name="tabs" />
|
2019-07-28 21:10:43 +00:00
|
|
|
</span>
|
2019-07-28 13:07:01 +00:00
|
|
|
</div>
|
2019-07-28 21:10:43 +00:00
|
|
|
<div class="panel-body emoji-dropdown-menu-content">
|
|
|
|
<div
|
2019-08-12 11:20:08 +00:00
|
|
|
v-if="!showingAdditional"
|
|
|
|
class="emoji-content"
|
2019-07-28 21:10:43 +00:00
|
|
|
>
|
2019-08-12 11:20:08 +00:00
|
|
|
<div class="emoji-search">
|
|
|
|
<input
|
|
|
|
v-model="keyword"
|
|
|
|
type="text"
|
|
|
|
class="form-control"
|
|
|
|
>
|
|
|
|
</div>
|
2019-07-28 21:10:43 +00:00
|
|
|
<div
|
2019-08-12 11:20:08 +00:00
|
|
|
ref="emoji-groups"
|
|
|
|
class="emoji-groups"
|
|
|
|
@scroll="scrolledGroup"
|
2019-07-28 21:10:43 +00:00
|
|
|
>
|
2019-08-12 11:20:08 +00:00
|
|
|
<div
|
|
|
|
v-for="(value, key) in emojis"
|
|
|
|
:key="key"
|
|
|
|
class="emoji-group"
|
2019-07-28 13:07:01 +00:00
|
|
|
>
|
2019-08-12 11:20:08 +00:00
|
|
|
<h6
|
|
|
|
:ref="'group-' + key"
|
|
|
|
class="emoji-group-title"
|
2019-07-28 21:10:43 +00:00
|
|
|
>
|
2019-08-12 11:20:08 +00:00
|
|
|
{{ value.text }}
|
|
|
|
</h6>
|
|
|
|
<span
|
|
|
|
v-for="emoji in value.emojis"
|
|
|
|
:key="key + emoji.displayText"
|
|
|
|
:title="emoji.displayText"
|
|
|
|
class="emoji-item"
|
|
|
|
@click="onEmoji(emoji)"
|
|
|
|
>
|
|
|
|
<span v-if="!emoji.imageUrl">{{ emoji.replacement }}</span>
|
|
|
|
<img
|
|
|
|
v-else
|
|
|
|
:src="emoji.imageUrl"
|
|
|
|
>
|
|
|
|
</span>
|
|
|
|
</div>
|
2019-07-28 21:10:43 +00:00
|
|
|
</div>
|
2019-03-29 16:48:52 +00:00
|
|
|
</div>
|
2019-08-12 11:20:08 +00:00
|
|
|
<div v-if="showingAdditional" class="additional-tabs-content">
|
|
|
|
<slot name="tab-content" />
|
|
|
|
</div>
|
2019-03-29 15:49:32 +00:00
|
|
|
</div>
|
2019-08-12 11:20:08 +00:00
|
|
|
</div>
|
2019-03-29 15:49:32 +00:00
|
|
|
</template>
|
|
|
|
|
2019-08-12 10:18:37 +00:00
|
|
|
<script src="./emoji_picker.js"></script>
|
2019-08-12 11:20:08 +00:00
|
|
|
<style lang="scss" src="./emoji_picker.scss"></style>
|