共1个回答
NV
游客nvRbwh
如果你想隐藏Emoji的输入框,可以这样处理:
<template>
<div id="exampleInputEmoji">
<div class="customStyleHere">
<input type="text" v-model="valueInput" />
<button @click="toogleDialogEmoji">Open Dialog Emojis</button>
</div>
<div :hidden="dialogHidden">
<VEmojiPicker :pack="emojisNative" @select="onSelectEmoji" />
</div>
</div>
</template>
<script>
import VEmojiPicker from "v-emoji-picker";
import packData from "v-emoji-picker/data/emojis.json";
export default {
name: "exampleInputEmoji",
components: {
VEmojiPicker
},
data: () => ({
valueInput: "Someting text ",
dialogHidden: true
}),
methods: {
toogleDialogEmoji() {
this.dialogHidden = !this.dialogHidden;
},
onSelectEmoji(dataEmoji) {
this.valueInput += dataEmoji.emoji;
}
},
computed: {
emojisNative() {
return packData;
}
}
};
</script>
<style lang="scss">
// (Set you custom style)
</style>
回答问题