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>
相关推荐
m0_547486666 分钟前
《JavaScript核心原理 》全套PPT课件2026
开发语言·javascript·ecmascript
xm_xm_xm_143 分钟前
react17版本以前类组件常用操作
前端·javascript·react.js
ly76891 小时前
Web 性能优化实战:从 Core Web Vitals 到工程化性能治理
前端·性能优化
冬奇Lab2 小时前
一天一个开源项目(第200篇):next-forge - 生产级 Next.js SaaS 启动模板
前端·前端框架·开源
Profile排查笔记2 小时前
指纹浏览器怎么设置 IP?代理配置、检测与排错流程
前端·人工智能·后端·自动化
lzhdim2 小时前
13、JavaScript事件循环机制 - JavaScript学习系列文章
开发语言·前端·javascript·学习·ecmascript
liangshanbo12152 小时前
Vue 3 <script setup> 的本质原理是什么?它与普通 setup()有何区别?
前端·javascript·vue.js
IT_陈寒3 小时前
SpringBoot自动配置失效?你可能漏了这个小开关
前端·人工智能·后端
kyriewen3 小时前
我写了1个复盘Skill,和AI协作踩过的坑第二天自动变成护栏
前端·程序员·ai编程
风骏时光牛马3 小时前
AI提示词异常故障复盘分析
前端