tree: 8742120daf9b50373f5baaac31a934e3b94e69c0 [path history] [tgz]
  1. index.js
  2. index.vue
  3. package.json
  4. README.md
  5. README_cn.md
packages/wxc-slider-bar/README.md

wxc-slider-bar

A slider component for displaying current value and intervals in range.

!> These rich interaction components are based on BindingX feature. Make sure your app install it.

Rule

  • To input a value in a range.

Demo

    

Code Example

<template>
  <wxc-slider-bar v-bind="sliderBarCfg"></wxc-slider-bar>
</template>
<script>
  import { WxcSliderBar } from 'weex-ui';
  export default {
  	components: { WxcSliderBar },
  	data: () => ({
      sliderBarCfg: {
        length: 400,
        range: false,
        min: 0,
        max: 100,
        value: 50,
        defaultValue: 50,
        disabled: false
      }
  	})
  }
</script>

More details can be found in here

API

PropTypeRequiredDefaultDescription
lengthNumberN500bar width
heightNumberN4bar height
rangeBooleanNfalsedual thumb mode
minNumberN0the minimum value the slider can slide to.
maxNumberN100the maximum value the slider can slide to
minDiffNumberN5the granularity the slider can step through values.
value[Number, Array]N0the value of slider
defaultValue[Number, Array]N0default value
disabledBooleanNfalseif true, the slider will not be interactable.
invalidColorStringN#E0E0E0invalid color
validColorStringN#EE9900valid color
disabledColorStringN#AAAdisabled color
selectRangeArrayN[0, 0]return value
blockColorStringN#FFFFFFblock color

Event

@updateValue="updateValue"
@wxcSliderBarTouchEnd="wxcSliderBarTouchEnd"