Emoji 表情组件
Go to file
2023-10-06 07:11:24 +08:00
dist 发布编译后的版本 2023-10-06 07:11:24 +08:00
public demo 2022-08-29 16:29:00 +08:00
.gitignore 发布编译后的版本 2023-10-06 07:11:24 +08:00
emoji.js debug 2023-10-06 07:04:54 +08:00
index.html end 2022-08-29 15:51:05 +08:00
LICENSE Initial commit 2022-08-28 18:35:29 +08:00
main.js debug 2023-10-06 07:04:54 +08:00
package-lock.json 更改预览图像路径 2023-10-06 06:26:59 +08:00
package.json 移除button, 使用回调事件 2023-10-06 06:51:30 +08:00
README.md 更改预览图像路径 2023-10-06 06:26:59 +08:00
style.css end 2022-08-29 15:51:05 +08:00

emoji

Emoji 表情组件

  • 流畅的动画效果
  • 精确插入光标位置
  • 使用 Esc 快捷键关闭弹出
  • 提供回调函数以便于拓展操作
  • 调用时才初始化以兼容服务端渲染项目
  • 动态插入调用支持

DEMO

preview

Click to open demo

Install

npm install satori-emoji --save
import Emoji from 'satori-emoji'

const emoji = new Emoji({
  input: document.querySelector('#input') ,        // 绑定的输入框元素(非必选)
  button: document.querySelector('#button'),       // 绑定的开关按钮(非必选)
  callback: (data) => console.log('cilck:', data), // 选中 emoji 表情的回调函数(非必选)
})

// 打开 emoji 表情选择窗口
emoji.show()


// 关闭 emoji 表情选择窗口
emoji.hide()

Dev

# clone
git clone git@github.com:InvisibleFuture/emoji.git
cd emoji

# install
npm install
npm run dev

# build
npm run build
npm preview