李凌
2025-12-16 9337c3cf960b60078558b7f942fd27f1ab39364b
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<template>
  <div id="assetsHead">
    <van-nav-bar :border="false" :title="title" :left-arrow="showLeft" @click-left="onClickLeft">
      <template #right>
        
        <slot></slot>
      </template>
    </van-nav-bar>
  </div>
</template>
 
<script>
export default {
  name: "assets-head",
  props: {
    title: {
      type: String,
      default: ''
    },
    goHome: {
      type: Boolean,
      default: false
    },
    goAssetsCenter: {
      type: Boolean,
      default: false
    },
    goPerpetualContract: {
      type: Boolean,
      default: false
    },
    showLeft: {
      type: Boolean,
      default: true
    },
    backFunc: {
      type: Function,
    },
    clickFunc: {
      type: Function,
    },
  },
  methods: {
    onClickLeft() {
      if (this.goHome) {
        this.$router.push('/');
      } else if (this.goAssetsCenter) {
        this.$router.push('/cryptos/assetsCenter/index');
      } else if (this.goPerpetualContract) {
        this.$router.go(-2);
      } else if (this.backFunc) {
        this.backFunc()
      } else if (this.clickFunc) {
        this.clickFunc()
      } else {
        this.$router.go(-1);
      }
    }
  }
}
</script>
 
<style lang="scss" scoped>
:deep(.van-nav-bar) {
  // background-color: $selectSymbol_background !important;
  background-color: $mainbgWhiteColor !important;
  .van-nav-bar__content {
    height: 96px;
  }
 
  .van-nav-bar__left {
    padding-left: 30px;
  }
 
  .van-nav-bar-icon {
    color: #999999;
  }
 
  .van-nav-bar__arrow {
    font-size: 48px !important;
    color: $dark-grey;
  }
 
  .van-nav-bar__right{
    // margin-right: 30px !important;
  }
 
  .van-nav-bar__title {
    font-size: 36px;
    font-weight: 400;
    // color: $text_color;
    color: $log-c;
    max-width: 100% !important;
    margin: 0 auto !important;
  }
 
}
</style>