guoshipeng
2023-08-16 c58bd2354c5cb0f0cd66d01d819979ab0f0e132f
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
<template>
    <div class="numberInfo">
    
    <slot name="title">
        <div v-if="title!=null"
            class="numberInfoTitle" >
            {{title}}
        </div>
    </slot>
    <div class="numberInfoSubTitle">
        <slot name="subTitle">
            <div v-if="subTitle!=null">
                {{subTitle}}
            </div>
        </slot>
    </div>
    
    
    <div class="numberInfoValue" 
    :style="{'margin-top': gap }">
      <span>
        {{total}}
        <em v-if="suffix!=null" class="suffix">{{suffix}}</em>
      </span>
    <span v-if="status || subTotal" 
        class="subTotal">
          {{subTotal}}
          <a-icon v-if="status" :type="`caret-${status}`" />
        </span>
    </div>
  </div>
</template>
 
<style lang="less">
 @import './Index.less';
</style>
 
<script  lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator';
 
 
@Component({})
export default class NumberInfo extends Vue {
 
    @Prop({type: String, default: null})
    private title!: string;
 
    @Prop({type: String, default: null})
    private subTitle!: string;
 
    @Prop({type: String, default: ''})
    private total!: string;
 
    @Prop({type: Number, default: 0})
    private subTotal!: number;
 
    @Prop({type: String, default: null})
    private status!: string;
 
    @Prop({type: String, default: null})
    private suffix!: string;
 
    @Prop({type: Number, default: null})
    private gap!: number;
}
</script>