zhangzeli
2022-01-05 1b98ab0d3d007a5a65bdd446483853df34b8919c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<template>
  <div class="card-progress">
    <h5 class="mb">
      {{value}}
      <small class="text-muted">{{title}}</small>
    </h5>
    <div class="progress">
      <Progress
        :percent="data"
        :stroke-width="5"
        :stroke-color="color"
        hide-info
        style="width: 80%;"
      />
      <span class="progress-value">{{data}}%</span>
    </div>
  </div>
</template>
 
<script>
export default {
  name: "bar",
  components: {},
  props: {
    value: {
      type: String,
      default: "0"
    },
    title: {
      type: String,
      default: "-"
    },
    data: {
      type: Number,
      default: 0
    },
    color: {
      type: String
    }
  },
  data() {
    return {};
  },
  mounted() {}
};
</script>
<style lang="less">
.card-progress {
  width: 100%;
  margin-bottom: 10px;
  .mb {
    margin-bottom: 0.375rem;
    font-weight: 500;
    color: #414d5f;
    font-size: 0.9375rem;
    .text-muted {
      color: #98a6ad;
      margin-left: 0.75rem;
      font-size: 0.75rem;
      font-weight: 400;
    }
  }
  .progress {
    width: 100%;
    display: flex;
    justify-content: space-between;
    .progress-value {
      width: 20%;
      text-align: right;
      font-weight: 700;
      color: #6c757d;
    }
  }
}
</style>