linting
This commit is contained in:
parent
03c2f29b0a
commit
fd66afe1e5
4 changed files with 60 additions and 33 deletions
|
@ -67,7 +67,7 @@ const EmojiInput = {
|
||||||
caret: 0,
|
caret: 0,
|
||||||
focused: false,
|
focused: false,
|
||||||
blurTimeout: null,
|
blurTimeout: null,
|
||||||
showPicker: false,
|
showPicker: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="emoji-input"
|
v-click-outside="onClickOutside"
|
||||||
v-click-outside="onClickOutside"
|
class="emoji-input"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
<template v-if="emojiPicker">
|
<template v-if="emojiPicker">
|
||||||
<div
|
<div
|
||||||
@click.prevent="togglePicker"
|
|
||||||
class="emoji-picker-icon"
|
class="emoji-picker-icon"
|
||||||
:class="pickerIconBottom ? 'picker-icon-bottom': 'picker-icon-right'"
|
:class="pickerIconBottom ? 'picker-icon-bottom': 'picker-icon-right'"
|
||||||
>
|
@click.prevent="togglePicker"
|
||||||
<i class="icon-smile"></i>
|
>
|
||||||
|
<i class="icon-smile" />
|
||||||
</div>
|
</div>
|
||||||
<EmojiPicker
|
<EmojiPicker
|
||||||
v-if="emojiPicker"
|
v-if="emojiPicker"
|
||||||
:class="{ hide: !showPicker }"
|
|
||||||
ref="picker"
|
ref="picker"
|
||||||
|
:class="{ hide: !showPicker }"
|
||||||
class="emoji-picker-panel"
|
class="emoji-picker-panel"
|
||||||
@emoji="insert"
|
@emoji="insert"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<div
|
<div
|
||||||
ref="panel"
|
ref="panel"
|
||||||
|
|
|
@ -1,31 +1,58 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="emoji-dropdown-menu panel panel-default">
|
<div class="emoji-dropdown-menu panel panel-default">
|
||||||
<div class="panel-heading emoji-tabs">
|
<div class="panel-heading emoji-tabs">
|
||||||
<span class="emoji-tabs-item" :class="{'active': activeGroup === key}" v-for="(value, key) in emojis" :key="key" :title="value.text" @click.prevent="highlight(key)">
|
<span
|
||||||
<i :class="value.icon"></i>
|
v-for="(value, key) in emojis"
|
||||||
</span>
|
:key="key"
|
||||||
</div>
|
class="emoji-tabs-item"
|
||||||
<div class="panel-body emoji-dropdown-menu-content">
|
:class="{'active': activeGroup === key}"
|
||||||
<div class="emoji-search">
|
:title="value.text"
|
||||||
<input type="text" class="form-control" v-model="keyword" />
|
@click.prevent="highlight(key)"
|
||||||
|
>
|
||||||
|
<i :class="value.icon" />
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="emoji-groups" ref="emoji-groups" @scroll="scrolledGroup">
|
<div class="panel-body emoji-dropdown-menu-content">
|
||||||
<div v-for="(value, key) in emojis" :key="key" class="emoji-group">
|
<div class="emoji-search">
|
||||||
<h6 class="emoji-group-title" :ref="'group-' + key">{{value.text}}</h6>
|
<input
|
||||||
<span
|
v-model="keyword"
|
||||||
v-for="emoji in value.emojis"
|
type="text"
|
||||||
:key="key + emoji.displayText"
|
class="form-control"
|
||||||
:title="emoji.displayText"
|
>
|
||||||
class="emoji-item"
|
</div>
|
||||||
@click="onEmoji(emoji)"
|
<div
|
||||||
|
ref="emoji-groups"
|
||||||
|
class="emoji-groups"
|
||||||
|
@scroll="scrolledGroup"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-for="(value, key) in emojis"
|
||||||
|
:key="key"
|
||||||
|
class="emoji-group"
|
||||||
|
>
|
||||||
|
<h6
|
||||||
|
:ref="'group-' + key"
|
||||||
|
class="emoji-group-title"
|
||||||
>
|
>
|
||||||
<span v-if="!emoji.imageUrl">{{emoji.replacement}}</span>
|
{{ value.text }}
|
||||||
<img :src="emoji.imageUrl" v-else>
|
</h6>
|
||||||
</span>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script src="./emoji-picker.js"></script>
|
<script src="./emoji-picker.js"></script>
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
<EmojiInput
|
<EmojiInput
|
||||||
v-if="newStatus.spoilerText || alwaysShowSubject"
|
v-if="newStatus.spoilerText || alwaysShowSubject"
|
||||||
v-model="newStatus.spoilerText"
|
v-model="newStatus.spoilerText"
|
||||||
emojiPicker
|
emoji-picker
|
||||||
:suggest="emojiSuggestor"
|
:suggest="emojiSuggestor"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
>
|
>
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
<EmojiInput
|
<EmojiInput
|
||||||
v-model="newStatus.status"
|
v-model="newStatus.status"
|
||||||
:suggest="emojiUserSuggestor"
|
:suggest="emojiUserSuggestor"
|
||||||
emojiPicker
|
emoji-picker
|
||||||
class="form-control main-input"
|
class="form-control main-input"
|
||||||
>
|
>
|
||||||
<textarea
|
<textarea
|
||||||
|
|
Loading…
Reference in a new issue