1.0.5 • Published 7 years ago

x-ripple v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

为html元素添加波纹点击效果

安装

npm i -S x-ripple

使用示例

  • 运行时需要window变量
  • 引入之后,把dom对象作为参数传入即可得到具有涟漪效果的元素
let xRipple = require('x-ripple')
//或者
//import xRipple from 'x-ripple'

//使用原生js获取到元素对象传入xRipple
let test_btn = document.getElementById('test-btn')
xRipple(test_btn)

//如果结合vue的指令那就更简单了
Vue.directive('ripple', {
  inserted: function (el) {
    xRipple(el)
  }
})

可配置项

暂无

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago