npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

z-emoji

v0.1.2

Published

the component of emoji

Downloads

4

Readme

z-emoji

安装

npm i -S z-emoji

ZEmoji 组件

参数说明

| 参数 | 描述 | 类型 | 可选值 | 默认值 | | --------- | ------------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | | placement | 表情列表悬浮框的位置 | String | "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "left", "left-start", "left-end", "right", "right-start", "right-end" | "top-start" | | trigger | 触发表情列表悬浮框显示隐藏条件 | String | "hover" | "hover","click" |

事件

| 事件名称 | 描述 | 回调参数 | | -------- | -------------- | --------------------------------------------------------------------------------------------------------- | | select | 选中表情时触发 | (code: string, el: string), code为表情对应的标识字符串,如"[微笑]", el为表情的 img 表情对应的字符串 |

slot

| 名称 | 说明 | | ---- | ---------------------------------- | | —— | 自定义触发按钮,默认为[微笑]表情 |

使用示例

  • 全局使用
// 在项目入口文件引入,如'main.js'
...
import ZEmoji from 'z-emoji'
...
Vue.use(ZEmoji)
...

// 在需要使用的组件中直接使用
<z-emoji @select="onSelect" />
  • 局部使用
// 在需要使用的组件中引入使用
import { ZEmoji } from 'z-emoji'
...
components: {
  ZEmoji
}
...
<z-emoji @select="onSelect" />
...

效果

image

ZEmojiList 组件

参数说明

| 参数 | 描述 | 类型 | 可选值 | 默认值 | | ------ | -------------------- | ------------- | ------ | ------- | | text | 表情对应的文本表示 | string | —— | "275px" | | height | 表情列表悬浮框的高度 | string,number | —— | "200px" |

事件

| 事件名称 | 描述 | 回调参数 | | -------- | -------------- | --------------------------------------------------------------------------------------------------------- | | select | 选中表情时触发 | (code: string, el: string), code为表情对应的标识字符串,如"[微笑]", el为表情的 img 表情对应的字符串 |

使用示例

  • 只支持局部使用
// 在需要使用的组件中引入使用
import { ZEmojiList } from 'z-emoji'
...
components: {
  ZEmojiList
}
...
<z-emoji-list @select="onSelect" />
...

效果

image

ZEmojiItem 组件

| 参数 | 描述 | 类型 | 可选值 | 默认值 | | ---- | ------------------ | ------ | ------------------ | ------ | | text | 表情对应的文本标识 | string | 支持的表情文本标识 | —— |

事件

| 事件名称 | 描述 | 回调参数 | | -------- | -------------- | --------------------------------------------------------------------------------------------------------- | | select | 选中表情时触发 | (code: string, el: string), code为表情对应的标识字符串,如"[微笑]", el为表情的 img 表情对应的字符串 |

使用示例

  • 只支持局部使用
// 在需要使用的组件中引入使用
import { ZEmojiItem } from 'z-emoji'
...
components: {
  ZEmojiItem
}
...
<z-emoji-item text="[大哭]" @select="onSelect" />
<z-emoji-item text="[微笑]" @select="onSelect" />
<z-emoji-item text="[调皮]" @select="onSelect" />
<z-emoji-item text="[哭]" @select="onSelect" />
...

效果

image