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>
相关推荐
用户693717500138423 分钟前
Kimi K3 综合能力处于全球第一梯队
android·前端·后端
anno38 分钟前
Agent 新手 Skill 优先级指南:从第一套必装工作流,到专业能力补全
前端·后端
Liora_Yvonne1 小时前
前端请求层到底怎么封?为什么全局 axios 单例越用越难维护
前端
anno1 小时前
别再把文档“一刀切”:用 LangChain.js 做好 RAG 的第一公里
前端·后端
皮卡穆1 小时前
React 中使用 react-org-tree 实现组织结构树
前端·react.js·前端框架
MariaH1 小时前
费曼学习法与effort-learning理论
前端
qiaofugui1 小时前
如何用 Codex 做一次可靠的项目重构:方法、节奏和可复用提示词
前端
涛涛ing1 小时前
前端圈7月大地震:TS 7发布、Bun 11天从Zig迁Rust、Kimi K3登顶、大厂裁员50%
前端
遇乐的果园1 小时前
前端学习笔记-vue列表处理
前端·vue.js·学习