@livelybone/vue-button
pkg.module supported
, which means that you can apply tree-shaking in you project
A vue button component with anti-shake feature implemented by Promise, custom lock styles or text
You maybe need a promise polyfill if you want to use it in IE
browser
repository
https://github.com/livelybone/vue-button.git
Demo
http://livelybone.github.io/vue/vue-button/
Installation
npm i -S @livelybone/vue-button
Global name
VueBtn
Usage
// import all
import VueBtn from '@livelybone/vue-button';
// Global register
Vue.component('VueBtn', VueBtn);
// Local register
new Vue({
components:{VueBtn}
})
when you want to set this module as external while you are developing another module, you should import it like this:
import VueBtn from '@livelybone/vue-button'
Props
Name | Type | DefaultValue | Description |
---|---|---|---|
clickFn |
Function (required) |
none | The handler of click returns a Promise |
errorFn |
Function |
none | The handler of Promise reject |
canUseAgain |
Boolean |
true |
Set whether the button can be used again or not |
Slots
default
lock
For custom lock content