Skip to content

Latest commit

 

History

History
 
 

wxc-button

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

wxc-button

Basic button with 4 built-in types, supports custom style

    

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 enum N red can be set to normal/ highlight/red/yellow
disabled bool N false set disabled(*1)
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