Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Latest commit

 

History

History
54 lines (42 loc) · 2.01 KB

File metadata and controls

54 lines (42 loc) · 2.01 KB

wxc-button

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.

Code Example

<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

API

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)
  • *1:disabled will override the default style.
  • *2:Detailed style can be referenced here
  • *3:Detailed style can be referenced here

Event

// `@wxcButtonClicked="wxcButtonClicked"`
will return e, type, disabled