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>
相关推荐
计算机魔术师41 分钟前
管谷歌的不是Pichai一个人,是一整层AI智能体
前端
米米商聊1 小时前
图标能点,按钮就可用了吗?键盘、名称与收藏状态
前端·javascript
Younglina1 小时前
三个晚上,我和 WorkBuddy 做了个生图网站
前端·后端·ai编程
xy34531 小时前
Axure 9.0 内联框架加载方式
前端·ui·html·axure·原型·产品设计
技术小甜甜2 小时前
【Cursor】Skill 被标黄色警告,怎么改成合格的 SKILL.md
开发语言·javascript·ai编程·cursor·1024程序员节·ai agent·skills
陈随易3 小时前
副业搞钱点子之收入查看器
前端·后端
Profile排查笔记3 小时前
浏览器指纹逆向怎么分析:从网络请求追踪到 JavaScript 采集链
前端·人工智能·后端·自动化
hudie7653 小时前
LikeShop 二开最常改的 5 个文件(附改前改后对比)
前端·uni-app·php·个人开发
qetfw3 小时前
Bash 函数与流程控制:read、if、for、case 验证
linux·前端·javascript·bash
鬼手点金4 小时前
从 API 消息到模型 Token:Chat Template
java·前端·javascript·数据库·人工智能·深度学习·1024程序员节