elementui中el-radio-group内容过长溢出问题
鼠标悬停显示文字
<template>
<el-radio-group
class="fixed-width-radio-group"
v-model="continueruleForm.category"
size="mini"
fill="#2f54eb"
color="#2f54eb"
>
<el-radio-button label="product" title="这是产品选项的提示信息">{{ $t('plan.chanTe') }}</el-radio-button>
<el-radio-button label="process" title="这是流程选项的提示信息">{{ $t('plan.guoTe') }}</el-radio-button>
</el-radio-group>
</template>
<style scoped>
.fixed-width-radio-group {
width: 200px; /* 设置您想要的固定宽度 */
overflow: hidden; /* 隐藏超出容器的内容 */
white-space: nowrap; /* 防止内容换行 */
display: flex; /* 使用 flex 布局以便子元素(按钮)能够正确排列 */
align-items: center; /* 垂直居中 */
/* 注意:text-overflow: ellipsis; 在这里可能不适用,因为按钮本身有固定的最小宽度 */
}
/* 如果需要,还可以为 el-radio-button 添加样式,但通常不需要为了显示 title 而添加额外样式 */
</style>
原文地址:https://blog.csdn.net/grow_/article/details/142870854
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!