tree: bcca30f65bfc6b89af24ebc2b57bdaf639de1369 [path history] [tgz]
  1. index.js
  2. index.vue
  3. package.json
  4. README.md
  5. README_cn.md
  6. type.js
packages/wxc-button/README.md

wxc-button

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

Demo

    

!>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

PropTypeRequiredDefaultDescription
textStringY-the text of button
typeStringNredcan be set to white/red/yellow/blue/green
sizeStringNfullcan be set to full/big/medium/small
disabledBooleanNfalseset disabled(*1)
isHighlightBooleanNfalseWhether to highlight
btnStyleObjectN{}custom style about button(*2)
textStyleObjectN{}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