mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-02 03:08:21 +08:00
3ca4473aeb
* feat(components): [checkbox & radio] Use value instead of label * feat(components): update * feat(components): update * feat(components): update * feat(components): update * feat(components): update * feat(components): update test * feat(components): true-value false-value * feat(components): update
33 lines
1.0 KiB
Vue
33 lines
1.0 KiB
Vue
<template>
|
|
<div>
|
|
<el-checkbox v-model="checked1" label="Option1" size="large" border />
|
|
<el-checkbox v-model="checked2" label="Option2" size="large" border />
|
|
</div>
|
|
<div class="mt-4">
|
|
<el-checkbox v-model="checked3" label="Option1" border />
|
|
<el-checkbox v-model="checked4" label="Option2" border />
|
|
</div>
|
|
<div class="mt-4">
|
|
<el-checkbox-group v-model="checkboxGroup1" size="small">
|
|
<el-checkbox label="Option1" value="Value1" border />
|
|
<el-checkbox label="Option2" value="Value2" border />
|
|
</el-checkbox-group>
|
|
</div>
|
|
<div class="mt-4">
|
|
<el-checkbox-group v-model="checkboxGroup1" size="small">
|
|
<el-checkbox label="Option1" value="Value1" border disabled />
|
|
<el-checkbox label="Option2" value="Value2" border disabled />
|
|
</el-checkbox-group>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ref } from 'vue'
|
|
|
|
const checked1 = ref(true)
|
|
const checked2 = ref(false)
|
|
const checked3 = ref(false)
|
|
const checked4 = ref(true)
|
|
const checkboxGroup1 = ref(['Value1'])
|
|
</script>
|