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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@sixi/popconfirm

v1.0.1

Published

气泡确认框

Downloads

6

Readme

popconfirm 气泡确认框

点击元素,弹出气泡式的确认框。

何时使用

目标元素的操作需要用户进一步的确认时,在目标元素附近弹出浮层提示,询问用户。和 ‘confirm’ 弹出的全屏居中模态对话框相比,交互形式更轻量,目标更明确。

代码演示

<template>
  <popconfirm title="确认删除?" okText="确认" cancelText="取消" @confirm="() => onDelete(11)">
    <a href="javascript:void(0);">删除</a>
  </popconfirm>
</template>
<script>
export default {
  methods: {
    onDelete (id) {
      console.log(id)
    }
  }
}
</script>

API

| 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | | cancelText | 取消按钮文字 | String | 取消 | | okText | 确认按钮文字 | String | 确定 | | title | 标题 | String | 确认执行此操作吗? | | placement | 出现位置(top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end) | String | top-end | | type | 确认类型(warning/danger) | String | warning |

事件

| 事件名称 | 说明 | 回调参数 | | :--- | :--- | :--- | | cancel | 点击取消的回调 | function(e) | | confirm | 点击确认的回调 | function(e) |