1
PC-20250623MANY\Administrator
2025-07-22 9ec3bd6e8d7357927533d8966f882cb5d28b3e0f
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
<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('/assetsCenter/assets');
      } 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>
.van-nav-bar {
  @include themify() {
    background: themed("footer_background") !important;
  }
}
</style>