# 4.9 多选列表(Checkbox List)

多选列表组件,用于展示可多选的列表项

# 基础用法

<template>
  <dof-checkbox-list :list="list" @dofCheckBoxListChecked="onChecked"></dof-checkbox-list>
</template>

<script>
export default {
  data() {
    return {
      list: [
        { title: '选项1', value: 1 },
        { title: '选项2', value: 2, checked: true }
      ]
    }
  }
}
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

# Attributes

Prop Type Required Default Description
list Array Y [] 列表数据
has-border Boolean N false 是否有边框
need-show-top-border Boolean N false 是否显示上边框
need-show-last-bottom-border Boolean N false 是否显示最后一项下边框

# Events

事件名 说明 回调参数
dofCheckBoxListChecked 选项点击事件 e.checkedList