Blame view

src/views/analysis/page/components/rightbl.vue 846 Bytes
a61d16e2   jack   1.更新文件
1
2
3
  <template>
    <div class="rightbl">
      <div class="slider-bg">
c9033522   jack   更新前端代码
4
        <div :style="'width:'+wid*200+'px;'" class="slider-color" />
a61d16e2   jack   1.更新文件
5
      </div>
c9033522   jack   更新前端代码
6
      <div class="bl">{{ data }}</div>
a61d16e2   jack   1.更新文件
7
8
9
10
11
12
    </div>
  </template>
  <script>
  export default {
    name: 'Rightbl',
    props: {
c9033522   jack   更新前端代码
13
14
15
16
17
18
19
20
21
      data: {
        type: String,
        default: ''
      }
    },
    computed: {
      wid() {
        return parseFloat(this.data.replace('%', '')) / 100
      }
a61d16e2   jack   1.更新文件
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
    }
  }
  </script>
  <style scoped>
  .rightbl{
      display: inline-block;
  }
  .slider-bg{
      width:200px;
      height:10px;
      display: inline-block;
      vertical-align: middle;
      border-radius: 5px;
      background: #ccc;
      position: relative;
  }
  .slider-color{
      position: absolute;
      top:0;
      left:0;
      height:10px;
      border-radius: 5px;
      background: #f00;
  }
  .bl{
      vertical-align: middle;
      display: inline-block
  }
  </style>