vue3 element-plus el-progress 圆形circle进度条 内置文字换行

2023-05-16

<div>
      <el-progress style="margin-left:20px" type="circle" :width="140" :height="100"  :stroke-width="10" :backgrounColor="'#fff'" :percentage="state.cpuUse" :format="format"></el-progress>
    </div>

加上/n

const  format = (percentage) => {
    return `容器组\n\n  ${percentage} / ${state.cpuTotal} `;
  }

设置一下css换行

 ::v-deep .el-progress__text {
  white-space: pre;
}

效果图

在这里插入图片描述

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

vue3 element-plus el-progress 圆形circle进度条 内置文字换行 的相关文章

随机推荐