mirror of
https://github.com/element-plus/element-plus.git
synced 2025-08-15 03:06:25 +08:00

* 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
19 lines
429 B
Vue
19 lines
429 B
Vue
<template>
|
|
<el-checkbox-group v-model="checkedCities" :min="1" :max="2">
|
|
<el-checkbox
|
|
v-for="city in cities"
|
|
:key="city"
|
|
:label="city"
|
|
:value="city"
|
|
>{{ city }}</el-checkbox
|
|
>
|
|
</el-checkbox-group>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ref } from 'vue'
|
|
|
|
const checkedCities = ref(['Shanghai', 'Beijing'])
|
|
const cities = ['Shanghai', 'Beijing', 'Guangzhou', 'Shenzhen']
|
|
</script>
|