element Progress 进度条超出100%会报错,且不展示进度值的解决办法


示例一:

<el-progress
                :text-inside="true"
                :stroke-width="17"
                :format="_format(row.reached)"
                :percentage="row.reached > 100 ? 100 : row.reached"
              ></el-progress>
    _format(value) {
      return () => {
        return value + '%'
      }
    },

示例二:

<el-progress
            type="circle"
            :stroke-width="12"
            :format="format(item.reached)"
            :percentage="item.reached > 100 ? 100 : item.reached"
          ></el-progress>
    format(percentage) {
      return () => {
        return percentage + '%' + '\n' + ' 已完成'
      }
    },

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM