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

vue-h5-ripple

v1.0.0

Published

vue 水波纹效果

Downloads

2

Readme

版权申明

版权声明:本插件源码Surmon的vue-touch-ripple项目,版权归Surmon所有,本人修改了少量的bug并发布来便于本团队使用。

Vue-h5-Ripple

Touch ripple component for Vue.js(1.x ~ 2.x).

组件component/指令directive两种方法可供使用,灵活简单,兼容Vue.js全版本。

  • 要注意的地方:

    • 使用directive模式时,组件会给所对应元素内部append子节点,如果是p、tr、img、Input...这些标签由于浏览器不支持再内嵌元素,故将会失效,所以刚才所述的单标签或者一些特殊的不允许内部插入元素的行内元素,在使用时需使用component方式

    • 使用component模式时,组件会在外层自动包裹div,div默认是block的,且本质上已经改变了外层dom结构,如果需要的话,可以通过给组件加class来用css改变其成为指定的盒子类型,如:

      <touch-ripple class="inline">
         <button>it's a button</button>
      </touch-ripple>
      .inline {
        display: inline-block;
      }
    • 推荐directive模式使用,在directive模式失效时,改用component模式

Use Setup

Install vue-h5-ripple

npm install vue-h5-ripple

Mount with vue

// import
import Vue from 'vue'
import VueH5Ripple from 'vue-h5-ripple'


// or require
const Vue = require('vue')
const VueH5Ripple = require('vue-h5-ripple')


// mount with global
Vue.use(VueH5Ripple)


// or mount with compoment
import Vue from 'vue'
import { touchRipple } from 'vue-h5-ripple'

export default {
  components: {
    touchRipple
  }
}
<!-- use with components -->
<touch-ripple>
   <!-- your code... -->
   <h1>it's a h1 title</h1>
   <div>it's a div block</div>
</touch-ripple>


<!-- use with directive(must be global Vue.use(VueTouchRipple)) -->
<button v-touch-ripple>check me!</button>
<h1 v-touch-ripple>I'm h1!</h1>
<div v-touch-ripple>I'm div!</div>

Author Blog

[Linevers]