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>
相关推荐
孤水寒月3 小时前
基于HTML的悬窗可拖动记事本
前端·css·html
祝余呀3 小时前
html初学者第一天
前端·html
脑袋大大的4 小时前
JavaScript 性能优化实战:减少 DOM 操作引发的重排与重绘
开发语言·javascript·性能优化
速易达网络5 小时前
RuoYi、Vue CLI 和 uni-app 结合构建跨端全家桶方案
javascript·vue.js·低代码
耶啵奶膘5 小时前
uniapp+firstUI——上传视频组件fui-upload-video
前端·javascript·uni-app
JoJo_Way5 小时前
LeetCode三数之和-js题解
javascript·算法·leetcode
视频砖家6 小时前
移动端Html5播放器按钮变小的问题解决方法
前端·javascript·viewport功能
lyj1689976 小时前
vue-i18n+vscode+vue 多语言使用
前端·vue.js·vscode
小白变怪兽8 小时前
一、react18+项目初始化(vite)
前端·react.js
ai小鬼头8 小时前
AIStarter如何快速部署Stable Diffusion?**新手也能轻松上手的AI绘图
前端·后端·github