mand-mobile/components/check
xuxiaoyan c676672d3e doc(check): fix format problem 2018-11-20 19:43:38 +08:00
..
demo example(check): change demo class name 2018-11-19 19:00:44 +08:00
test feat(check): code refactor 2018-09-24 15:48:30 +08:00
README.en-US.md doc(check): fix format problem 2018-11-20 19:43:38 +08:00
README.md doc(check): fix format problem 2018-11-20 19:43:38 +08:00
box.vue feat(check): code refactor 2018-09-24 15:48:30 +08:00
component.js feat(check): code refactor 2018-09-24 15:48:30 +08:00
group.vue feat(check): code refactor 2018-09-24 15:48:30 +08:00
index.vue fix(check): update icon style 2018-10-15 14:41:45 +08:00
list.vue fix: fix docs 2018-11-20 16:30:05 +08:00

README.en-US.md

title preview
Check https://didi.github.io/mand-mobile/examples/#/check

UI renderless check group component. 2.0.0+

Import

import { Check, CheckBox, CheckGroup, CheckList } from 'mand-mobile'

Vue.component(Check.name, Check)
Vue.component(CheckBox.name, CheckBox)
Vue.component(CheckGroup.name, CheckGroup)
Vue.component(CheckList.name, CheckList)

Code Examples

API

Check Props

Props Description Type Default Note
name unique name Boolean/String true -
v-model selected name Boolean/String false -
disabled whether disable selection or not Boolean false -

CheckBox Props

Props Description Type Default Note
name unique name Boolean/String true -
v-model selected name Boolean/String false -
disabled whether disable selection or not Boolean false -

CheckGroup Props

Check multiple checks. Combine with Check or CheckBox.

Props Description Type Default Note
v-model selected names Array - -
max max selected name length Number 0 0: no limit

CheckGroup Methods

check(name)
Arg Description Type Default
name name will be selected String -
uncheck(name)
Arg Description Type Default
name name will be unselected String -
toggle(name)
Arg Description Type Default
name name will be toggle String -

CheckList Props

Arg Description Type Default
v-model selected names Array -
options data otpions Array<{text, value, disabled, ...}> [] -

CheckList Slots

CheckGroup default slot will be used as template, and it will receive {option} from slot-scope.

<template>
  <md-check-list :options="data">
    <template slot-scope="{ option }">
      <div class="custom-title" v-text="option.text"></div>
      <div class="custom-brief">{{ option.text }} custom description</div>
    </template>
  </md-check-list>
</template>