elementUI进度条el-progress不显示白色

效果图

通过设置百分比为100,动态修改进度条的宽度完成

javascript 复制代码
<template>
  <div class="myProgressBox">
    <div class="index">{{ index }}</div>
    <div class="typeTitle">{{ typeTitle }}</div>
    <div class="twoProgressBox">
      <el-progress :stroke-width="12" :percentage="percentage1" :format="formatZS"></el-progress>
      <el-progress class="yjcprogress" :stroke-width="12" :percentage="percentage2" :format="formatYJC"  :style="{ width: '80%' }"></el-progress>

    </div>
  </div>
</template>

<script>



export default {
  components: {},
  props: {
    index: {
      type: String,
      default: '1'
    },
    typeTitle: {
      type: String,
      default: '类型1'
    },
    ZSNumber: {//总数
      type: String,
      default: '918'
    },
    YJCNumber: {//已解除
      type: String,
      default: '500'
    },

    percentage1: {//总数百分比
      type: Number,
      default: 100
    },
    percentage2: {//已解除百分比
      type: Number,
      default: 100
    },




  },
  data() {
    return {


    };
  },
  mounted() { },
  methods: {
    // 返回总数
    formatZS(percentage) {
      return this.ZSNumber
    },
    // 返回已解除
    formatYJC(percentage) {
      return this.YJCNumber
    }


  },
};
</script>

<style scoped lang="scss">
.myProgressBox {
  .twoProgressBox {
    .yjcprogress {
      .el-progress{
        width: 50%;
      }
    }
    .el-progress.yjcprogress.el-progress--line{
      // width: 50%;
    }
  }

}
</style>
相关推荐
hhwyqwqhhwy14 分钟前
设备树之 provider 和 consumer
java·linux·前端
云舜言传24 分钟前
Bloom 手势演示操作 · 录屏指南
javascript·深度学习·机器学习
垆边人似月.1 小时前
Python中如何使用get函数实现频次查询
服务器·前端·python
moshuying2 小时前
DeepSeek开源生产级推理框架DeepInfer:单集群一天处理155万亿token,这意味着什么?
前端
子兮曰3 小时前
PHP漏洞危机,你的网站升级了吗?
前端·后端·php
jerrywus3 小时前
给 Pi 装上生图插件:从登录报错到画出一只 200×200 的猫
前端·agent·claude
陈随易3 小时前
搞钱点子之生态鱼缸
前端·后端·程序员
PBitW3 小时前
从空目录到上线:我全程用 TRAE 做了一款微信小游戏合集(含一次完整架构重构)
前端·trae
不爱学英文的码字机器3 小时前
从Q1迁到T1,同一个编号已经换了含义
前端·数据库·microsoft
云和数据.ChenGuang3 小时前
光哥说Python 循环导入(Circular Import)深度解析:成因、排查与解决方案
开发语言·前端·人工智能·python·langchain