mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
* feat(components): [checkbox-group] support options * chore: ts logic * docs: add doc * Update checkbox-group.ts * chore: eslint * refactor: use ts logic * refactor: fix effect lost * test: add test case * refactor: simplify * chore: build error * refactor: use independent getOptionProps * refactor: rename defaultProps * Update checkbox-group.vue * chore: rename optionProps * refactor: add more attr support * chore: update version * chore: changed props * Update checkbox.md
21 lines
537 B
Vue
21 lines
537 B
Vue
<template>
|
|
<el-checkbox-group v-model="checkList" :options="options" />
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ref } from 'vue'
|
|
|
|
const checkList = ref(['Value selected and disabled', 'Value A'])
|
|
const options = [
|
|
{ label: 'Option A', value: 'Value A' },
|
|
{ label: 'Option B', value: 'Value B' },
|
|
{ label: 'Option C', value: 'Value C' },
|
|
{ label: 'disabled', value: 'Value disabled', disabled: true },
|
|
{
|
|
label: 'selected and disabled',
|
|
value: 'Value selected and disabled',
|
|
disabled: true,
|
|
},
|
|
]
|
|
</script>
|