Basic button with 4 built-in types, supports custom style
!>In weex-ui
V0.6.0 version above, type
Api has been modified, and size
Api is added.
<template> <wxc-button text="Confirm" @wxcButtonClicked="wxcButtonClicked"></wxc-button> </template> <script> import { WxcButton } from 'weex-ui' export default { components: { WxcButton }, methods: { wxcButtonClicked (e) { console.log(e) } } } </script>
More details can be found in here
Prop | Type | Required | Default | Description |
---|---|---|---|---|
text | String | Y | - | the text of button |
type | String | N | red | can be set to white /red /yellow /blue /green |
size | String | N | full | can be set to full /big /medium /small |
disabled | Boolean | N | false | set disabled(*1) |
isHighlight | Boolean | N | false | Whether to highlight |
btnStyle | Object | N | {} | custom style about button(*2) |
textStyle | Object | N | {} | custom style about text (*3) |
disabled
will override the default style.// `@wxcButtonClicked="wxcButtonClicked"` will return e, type, disabled