2019-03-30 02:49:32 +11:00
|
|
|
<template>
|
2019-08-12 21:20:08 +10: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-29 07:10:43 +10:00
|
|
|
</span>
|
2019-07-28 23:07:01 +10:00
|
|
|
</div>
|
2019-07-29 07:10:43 +10:00
|
|
|
<div class="panel-body emoji-dropdown-menu-content">
|
|
|
|
<div
|
2019-08-12 21:20:08 +10:00
|
|
|
v-if="!showingAdditional"
|
|
|
|
class="emoji-content"
|
2019-07-29 07:10:43 +10:00
|
|
|
>
|
2019-08-12 21:20:08 +10:00
|
|
|
<div class="emoji-search">
|
|
|
|
<input
|
|
|
|
v-model="keyword"
|
|
|
|
type="text"
|
|
|
|
class="form-control"
|
|
|
|
>
|
|
|
|
</div>
|
2019-07-29 07:10:43 +10:00
|
|
|
<div
|
2019-08-12 21:20:08 +10:00
|
|
|
ref="emoji-groups"
|
|
|
|
class="emoji-groups"
|
|
|
|
@scroll="scrolledGroup"
|
2019-07-29 07:10:43 +10:00
|
|
|
>
|
2019-08-12 21:20:08 +10:00
|
|
|
<div
|
|
|
|
v-for="(value, key) in emojis"
|
|
|
|
:key="key"
|
|
|
|
class="emoji-group"
|
2019-07-28 23:07:01 +10:00
|
|
|
>
|
2019-08-12 21:20:08 +10:00
|
|
|
<h6
|
|
|
|
:ref="'group-' + key"
|
|
|
|
class="emoji-group-title"
|
2019-07-29 07:10:43 +10:00
|
|
|
>
|
2019-08-12 21:20:08 +10: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-29 07:10:43 +10:00
|
|
|
</div>
|
2019-03-30 03:48:52 +11:00
|
|
|
</div>
|
2019-08-12 21:20:08 +10:00
|
|
|
<div v-if="showingAdditional" class="additional-tabs-content">
|
|
|
|
<slot name="tab-content" />
|
|
|
|
</div>
|
2019-03-30 02:49:32 +11:00
|
|
|
</div>
|
2019-08-12 21:20:08 +10:00
|
|
|
</div>
|
2019-03-30 02:49:32 +11:00
|
|
|
</template>
|
|
|
|
|
2019-08-12 20:18:37 +10:00
|
|
|
<script src="./emoji_picker.js"></script>
|
2019-08-12 21:20:08 +10:00
|
|
|
<style lang="scss" src="./emoji_picker.scss"></style>
|