ZZJ
2022-03-09 cc7401e771e13b40bb7dea11ec26da3acfc8e5c7
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
 
<template>
  <div class="Price">
    ¥<span class="newPrice">{{ priceNew1 }}</span
    >.00/年
    <span class="oldPrice">¥{{ priceOld1 }}.00/年</span>
  </div>
</template>
 
<script>
export default {
  props: {
    priceNew: {},
    priceOld: {},
  },
  computed: {
    priceNew1() {
      if (this.priceNew) {
        return this.priceNew;
      } else {
        return 0;
      }
    },
    priceOld1() {
      if (this.priceOld) {
        return this.priceOld;
      } else {
        return this.priceNew1 * 2;
      }
    },
  },
};
</script>
 
<style lang="scss" scoped>
.Price {
  margin: 0 20px 0 20px;
  font-size: 14px;
  text-align: left;
 
  .newPrice {
    font-size: 30px;
    color: rgb(255, 96, 0);
    font-weight: 700;
  }
 
  .oldPrice {
    margin-left: 10px;
    font-size: 14px;
    color: #999999;
    text-decoration: line-through;
  }
}
</style>