Blame view

src/components/base/AccountNum.vue 1.72 KB
f9b345a2   liuqimichale   全局filters
1
2
  <template>
      <div class="total-wrap">
d3312374   liuqimichale   收费员信息
3
          <slot></slot>
43352ba2   liuqimichale   数字处理
4
          <div class="total-main" >
633692cc   liuqimichale   axios
5
              <div  v-for="(item,index) in total" :key="index+Math.random()" :class="item !==',' ? 'eleNumBg':'noeleNumBg'" >
f9b345a2   liuqimichale   全局filters
6
7
8
9
10
11
12
13
14
15
                  {{item}}
              </div>
          </div>
      </div>
  </template>
  
  <script>
  import { formaterTotal } from '../../utils/formate'
  export default {
    name: 'AccountNum',
633692cc   liuqimichale   axios
16
    props:['totalnum'],
f9b345a2   liuqimichale   全局filters
17
18
    data(){
      return {
350097e4   liuqimichale   调取接口
19
20
21
22
23
24
25
26
27
        //total: formaterTotal(this.totalnum)
      }
    },
    created(){
      //console.log(this.totalnum)
    },
    computed:{
      total(){
        return formaterTotal(this.totalnum)
f9b345a2   liuqimichale   全局filters
28
29
30
31
32
33
34
35
36
37
      }
    }
  }
  </script>
  
  <style scoped lang="scss">
      .total-wrap{
          height: 30%;
          display: flex;
          align-items: center;
d3312374   liuqimichale   收费员信息
38
39
40
41
42
          span{
              display: inline-block;
              width: 50px;
              text-align: left;
          }
f9b345a2   liuqimichale   全局filters
43
          .total-main{
d3312374   liuqimichale   收费员信息
44
              /*margin-left: 10px;*/
f9b345a2   liuqimichale   全局filters
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
              padding: 5px 5px 5px 0;
              background: url("../../images/content/numBorder.svg") no-repeat;
              background-size: 100% 100%;
          }
          .eleNumBg{
              width: 20px;
              height: 30px;
              display: inline-block;
              margin-left: 5px;
              line-height: 30px;
              font-size: 22px;
              font-weight: 600;
              text-align: center;
              background: url("../../images/content/numBg.svg") no-repeat;
              background-size: 100% 100%;
          }
43352ba2   liuqimichale   数字处理
61
62
63
64
65
66
67
68
69
70
          .noeleNumBg{
              width: 10px;
              height: 30px;
              display: inline-block;
              margin-left: 5px;
              line-height: 30px;
              font-size: 22px;
              font-weight: 600;
              text-align: center;
          }
f9b345a2   liuqimichale   全局filters
71
72
      }
  </style>