quasar
Version:
Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
101 lines (90 loc) • 3.29 kB
JSON
{
"mixins": [ "components/btn/use-btn" ],
"meta": {
"docsUrl": "https://v2.quasar.dev/vue-components/button"
},
"props": {
"round": {
"type": "Boolean",
"desc": "Makes a circle shaped button",
"category": "style"
},
"percentage": {
"type": "Number",
"desc": "Percentage (0.0 < x < 100.0); To be used along 'loading' prop; Display a progress bar on the background",
"category": "behavior"
},
"dark-percentage": {
"type": "Boolean",
"desc": "Progress bar on the background should have dark color; To be used along with 'percentage' and 'loading' props",
"category": "behavior"
}
},
"slots": {
"default": {
"desc": "Use for custom content, instead of relying on 'icon' and 'label' props"
},
"loading": {
"desc": "Override the default QSpinner when in 'loading' state"
}
},
"methods": {
"click": {
"desc": "Emulate click on QBtn",
"params": {
"evt": {
"extends": "evt"
}
}
}
},
"events": {
"click": {
"desc": "Emitted when the component is clicked",
"params": {
"evt": {
"extends": "evt",
"desc": "JS event object; If you are using route navigation ('to'/'replace' props) and you want to cancel navigation then call evt.preventDefault() synchronously in your event handler"
},
"go": {
"type": "Function",
"desc": "Available ONLY if you are using route navigation ('to'/'replace' props); When you need to control the time at which the component should trigger the route navigation then call evt.preventDefault() synchronously and then call this function at your convenience; Useful if you have async work to be done before the actual route navigation or if you want to redirect somewhere else",
"required": false,
"addedIn": "v2.9",
"params": {
"opts": {
"type": "Object",
"desc": "Optional options",
"required": false,
"definition": {
"to": {
"type": [ "String", "Object" ],
"desc": "Equivalent to Vue Router <router-link> 'to' property; Specify it explicitly otherwise it will be set with same value as component's 'to' prop",
"required": false,
"examples": [
"/home/dashboard",
"{ name: 'my-route-name' }"
]
},
"replace": {
"type": "Boolean",
"desc": "Equivalent to Vue Router <router-link> 'replace' property; Specify it explicitly otherwise it will be set with same value as component's 'replace' prop",
"required": false
},
"returnRouterError": {
"type": "Boolean",
"desc": "Return the router error, if any; Otherwise the returned Promise will always fulfill",
"required": false
}
}
}
},
"returns": {
"type": "Promise<any>",
"desc": "Returns the router's navigation promise"
}
}
}
}
}
}