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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
| <template>
| <div id="assetsHead">
| <van-nav-bar :border="false" :title="title" :left-arrow="showLeft" @click-left="onClickLeft">
| <template #left>
| <div class="back-btn">
| <img src="@/assets/image/icon_back2.png" alt="" />
| </div>
| </template>
|
| <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>
| .back-btn {
| width: 4rem;
| height: 4rem;
| display: flex;
| align-items: center;
| justify-content: center;
| cursor: pointer;
|
| img {
| width: 100%;
| height: 100%;
| }
| }
|
| :deep(.van-nav-bar) {
| box-shadow: none !important;
| border-bottom: none !important;
| // background-color: $selectSymbol_background !important;
| .van-nav-bar__content {
| height: 7.5rem;
| }
|
| .van-nav-bar__left {
| // padding-left: 1.875rem;
| }
|
| .van-nav-bar-icon {
| color: #999999;
| }
|
| .van-nav-bar__arrow {
| font-size: 6rem !important;
| color: $dark-grey;
| }
|
| .van-nav-bar__title {
| font-size: 3rem;
| font-weight: 700;
| color: $text_color;
| max-width: 100% !important;
| margin: 0 auto !important;
| }
|
| }
| </style>
|
|