whyczyk
2021-07-31 04c2eb1db65b16f8d1b5c6a3b1eda6bb843f2bc3
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
<template>
  <div class="processCon">
    <div class="inner" :style="{'width':+process+'%'}"></div>
    <div class="tips" :style="{'left':'calc('+process+'% - 10px)'}" style="left:">{{text}}</div>
  </div>
</template>
 
<script>
  export default {
    props: ['process', 'text'],
    data() {
      return {
 
      }
    },
  }
</script>
 
<style scoped>
  .processCon {
    width: 100%;
    height: 12px;
    border-radius: 4px;
    background-color: #f2f2f2;
    position: relative;
  }
 
  .processCon .inner {
    height: 12px;
    border-radius: 4px;
    background-color: #ffe328;
    position: absolute;
    top: 0;
    left: 0;
  }
 
  .processCon .tips {
    position: absolute;
    top: -40px;
    left: 0;
    background-color: #ffe328;
    color: #333333;
    font-size: 10px;
    padding: 6px 12px;
    border-radius: 4px;
  }
 
  .processCon .tips:before {
    position: absolute;
    content: '';
    border-top: 10px #ffe328 solid;
    border-left: 10px transparent dashed;
    border-bottom: 10px transparent dashed;
    border-right: 10px transparent dashed;
    left: 0;
    bottom: -16px;
    /*覆盖并错开1px*/
    border-top: 10px #ffe328 solid;
  }
</style>