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
https://github.com/livelybone/vue-button.git
http://livelybone.github.io/vue/vue-button/
npm i -S @livelybone/vue-button
VueBtn
// 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'
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 |
For custom lock content