-
就是百分比为 500% 文字也要展示为500% 进度条为满的情况
-
eleemt 表格中 展示进度条以及 超过一百不显示数字问题 因为数据被后台删了 展示无法展示效果了
-
遇到的问题是 percentage值大于100以后 数字部分渲染出现问题 ----主要依靠 format指定进度条文字内容 ----text-inside文字放在进图条中 ----大于100让进图条为100, :percentage=“scope.row.rate>100? 100 :scope.row.rate”
<el-table-column align="center" prop="rate" width="200" sortable label="截止今天目标完成率">
<template slot-scope="scope">
<!-- 遇到的问题是 percentage值大于100以后 数字部分渲染出现问题 主要依靠 format指定进度条文字内容 text-inside文字放在进图条中 ----大于100让进图条为100,:percentage="scope.row.rate>100? 100 :scope.row.rate" -->
<el-progress :stroke-width="26" :text-inside="true" :format="_format(scope.row.rate)" :percentage="scope.row.rate>100? 100 :scope.row.rate"></el-progress>
</template>
</el-table-column>
- percentage 对数据进行处理 如果大于100 就为100 会解决 element 的数字大过100的错误
- 方法里面 对数据进行处理 指定进度条文字内容
_format(value) {
return () => {
return value + '%'
}
},