当前位置:网站首页>单项框 复选框
单项框 复选框
2022-07-05 02:43:00 【13少啊】
一.复选框的使用
<template>
<div>
{
{checkList}}
<el-checkbox-group v-model="checkList">
<el-checkbox label="复选框 A"></el-checkbox>
<el-checkbox label="复选框 B"></el-checkbox>
<el-checkbox label="复选框 C"></el-checkbox>
</el-checkbox-group>
</div>
</template>
<script>
export default {
data () {
return {
checkList: []
};
}
};
</script>
解析:
v-model绑定是一个数组,选中的项都会在这个数组里面。
二.单选框的使用
<template>
<el-radio-group v-model="radio">
<el-radio :label="3">备选项</el-radio>
<el-radio :label="6">备选项</el-radio>
<el-radio :label="9">备选项</el-radio>
</el-radio-group>
</template>
<script>
export default {
data () {
return {
radio: 6
};
}
}
</script>
通过v-model进行关联,双向绑定一个值。
值与label进行对应,选中的值是多少就显示多少。
边栏推荐
- 8. Commodity management - commodity classification
- The phenomenology of crypto world: Pioneer entropy
- When to catch an exception and when to throw an exception- When to catch the Exception vs When to throw the Exceptions?
- Voice chip wt2003h4 B008 single chip to realize the quick design of intelligent doorbell scheme
- 平台入驻与独立部署优缺点对比
- The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
- GFS distributed file system
- Hmi-30- [motion mode] the module on the right side of the instrument starts to write
- ELFK部署
- The database and recharge are gone
猜你喜欢
Avoid material "minefields"! Play with super high conversion rate
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Introduce reflow & repaint, and how to optimize it?
Azkaban实战
Pytest (4) - test case execution sequence
【附源码】基于知识图谱的智能推荐系统-Sylvie小兔
[download white paper] does your customer relationship management (CRM) really "manage" customers?
Bert fine tuning skills experiment
Elk log analysis system
Master Fur
随机推荐
Exploration of short text analysis in the field of medical and health (II)
A tab Sina navigation bar
Medusa installation and simple use
RichView TRVStyle MainRVStyle
Master Fur
Bumblebee: build, deliver, and run ebpf programs smoothly like silk
Structure of ViewModel
Kotlin - 协程 Coroutine
Serious bugs with lifted/nullable conversions from int, allowing conversion from decimal
使用druid连接MySQL数据库报类型错误
openresty ngx_lua变量操作
丸子百度小程序详细配置教程,审核通过。
Why is this an undefined behavior- Why is this an undefined behavior?
TCP security of network security foundation
Hmi-32- [motion mode] add light panel and basic information column
Design and implementation of community hospital information system
[download white paper] does your customer relationship management (CRM) really "manage" customers?
The phenomenology of crypto world: Pioneer entropy
[200 opencv routines] 99 Modified alpha mean filter
openresty ngx_lua执行阶段