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

popup-animation

v0.2.6

Published

### 安装

Downloads

12

Readme

popup-animation 组件使用

安装

$npm install popup-animation -S
  1. 全局安装插件

    // 在 vue 入口函数中安装插件
    import Vue from 'vue';
    import Popup from 'popup-animation';
    Vue.use(Popup);
  2. 单个组件中使用

    import { popup } from 'popup-animation';
    popup(component,options);

使用

this.$popup(component,options);

参数

  1. component

    需要弹出的组件

  2. options

    | key | Description | Require | default | | ---------- | ---------------------------------------------------------- | ------- | ---------------------------------- | | positon | 自定义弹出位置,如果 target存在,则首先从target 中获取数据 | — | | | props | 弹出组件中自定义属性对象 | — | {} | | on | 弹出组件自定义事件监听对象 | — | {} | | target | 从目标元素中弹出 | — | {} | | isClose | 是否可以通过点击遮罩层关闭弹窗 | — | True | | transition | 自定义弹出动画和时间 | — | 0.3s cubic-bezier(.61,.59,.63,1.6) |

返回值

popup 实例,⚠️注意:popup实例并非是传入的自组件实例

popup 实例方法

| name | Description | ruturn | | ----- | ----------- | ------ | | close | 关闭弹窗 | 无 |

例子

<templete>
	<button @click="test">
    测试
  </button>
  <h1 ref="h1">
    我是被弹出的组件
  </h1>
</templete>
<script>
	export default {
    methods:{
      test(el){
        this.$popup(this.$refs.h1);
      }
    }
  }
</script>

注意事项:

  1. 弹出层和app不属于同一个 上下文,目前版本,请不要在弹出层中使用 this.$router,this.$store等,如有需要,请使用eventBus