如果你希望实现 el-checkbox 的换行显示,可以通过以下几种方法来实现: 1. 使用CSS样式 你可以通过添加自定义的CSS样式来强制 el-checkbox 换行。例如,可以为 el-checkbox 的父容器设置一个固定宽度,并设置 el-checkbox 为块级元素或者使用 display: flex 和flex-direction: column 来实现垂直布局。 html <...
在el-radio或el-checkbox上添加属性(给标签设置一个class): display:flex;/* 用于对齐文本 */ 在el-radio或el-checkbox的选项标签上添加属性: /deep/ .el-radio__label{white-space:normal;/* 换行 */}/deep/ .el-checkbox__label{white-space:normal;/* 换行 */}...
文字超出换行 /deep/.el-checkbox__label{word-break:normal;width:auto;display:inline-grid;white-space:pre-line;word-wrap:break-word;overflow:hidden;line-height:14px;} 一行显示一项 /deep/ .el-checkbox { width: 100%; margin-top: 20px; } 表格里的多选框 // 多选/deep/.el-checkbox__inner{...