element-ui 单选框垂直排列
时间: 2023-09-04 12:17:39 浏览: 211
要实现element-ui单选框的垂直排列,可以通过给el-radio-group设置type="vertical"属性来实现。例如,在Vue框架下,可以通过添加div来实现垂直排列的效果。代码如下所示:
```html
<template>
<el-radio-group v-model="selectMod" size="small" type="vertical">
<div v-for="index of 3">
<el-radio-button label="第一列"></el-radio-button>
</div>
</el-radio-group>
</template>
```
通过设置type="vertical",el-radio-group会将单选框垂直排列显示。同时,使用element-ui可以极大简化开发时间,并且更容易上手。因此,使用element-ui可以方便地实现单选框的垂直排列效果。<span class="em">1</span><span class="em">2</span>
#### 引用[.reference_title]
- *1* [element ui el-radio-group 增加垂直排列](https://blog.csdn.net/qq_35462323/article/details/119276258)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [基于Vue框架的element-ui离线文档](https://download.csdn.net/download/m0_60886334/86245825)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文