ADKcodeXD / Vue3-Emoji

基于Vue3和emoji-data.json实现的表情选择组件
MIT License
47 stars 6 forks source link

Vue 3 Emoji

一款简单的 ,还算好看的,基于Vue3编写的表情选择组件。

功能/feature

启动本项目/start this project

git clone https://github.com/ADKcodeXD/Vue3-Emoji
cd Vue3-Emoji
yarn install
yarn dev

使用/Usage

使用npm

npm install vue3-emoji

使用yarn

yarn add vue3-emoji

基本使用 /basic usage

//example.vue
<script setup>
import V3Emoji from 'vue3-emoji'
import 'vue3-emoji/dist/style.css'
</script>

<template>
  <div>
    <V3Emoji />
  </div>
</template>

当然 你可以自定义按钮

<template>
  <div>
      <V3Emoji >
        <div class="my-btn">
            btn
        </div>
      </V3Emoji>
  </div>
</template>

本组件支持了三种不同的大小

<template>
  <div>
      <V3Emoji size="big" />
      <V3Emoji size="small" />
      <V3Emoji size="mid" />
  </div>
</template>

支持了暗黑主题

<template>
  <div>
      <V3Emoji theme="dark" />
  </div>
</template>

支持了最近常用表情(基于localstorage)

<template>
  <div>
      <V3Emoji :recent="true" />
  </div>
</template>

通过default-select你可以指定默认的选项卡

<template>
  <div>
      <V3Emoji default-select="Animals & Nature" />
      <!--你可以指定最近使用表情的tab作为默认tab-->
      <V3Emoji default-select="recenet" :recent="true" />
  </div>
</template>
支持皮肤的选择 ```vue ``` #### @click-emoji **点击emoji会触发相应的事件** ```vue