https://github.com/ddzy/canvas-water-button
canvas 波浪按钮插件
https://github.com/ddzy/canvas-water-button
Last synced: 2 months ago
JSON representation
canvas 波浪按钮插件
- Host: GitHub
- URL: https://github.com/ddzy/canvas-water-button
- Owner: ddzy
- License: mit
- Created: 2020-04-10T06:05:31.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T17:58:01.000Z (over 3 years ago)
- Last Synced: 2025-03-10T18:28:12.837Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://project.yyge.top/canvas/canvas-water-button/
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# canvas-water-button
## 介绍
canvas 波浪按钮插件, 点击任意 `DOM` 元素可显示渐变的波浪效果, 适用于所有框架场景.
## 在 Vue 中使用
1. 引入 js
```js
import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
// 引入
import "@/js/index";
Vue.config.productionTip = false;
new Vue({
router,
store,
render: h => h(App)
}).$mount("#app");
```
2. 使用方式
```html
取消
应用
export default {};
```
1. 可配置项
| Name | Required | Description |
| ----------------------- | -------- | ------------------------------------------- |
| k-water-btn | true | 在需要波浪按钮效果的 `DOM` 元素上添加该类名 |
| data-k-water-fill-color | false | 波浪的颜色值 |
| data-k-water-unconstant | false | 关闭连续波浪(`连续点击会产生多个波浪`) |