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
114
115
116
117
118
| <template>
| <div>
| <div class="asiis">
| <!-- <van-tabs
| :active="active"
| line-width="15px"
| @change="(e) => change(e, 'active')"
| >
| <van-tab v-for="(item, index) in tabsList" :key="index" :name="item.key">
| <template #title>
| <div class="title">{{ item.title }}</div>
| </template>
| </van-tab>
| </van-tabs> -->
| <div class="list">
| <div class="list_box" v-for="(item, index) in tabsList" :key="index" :name="item.key">
| <div @click="changetype(item.key, index)" :class="typeindex==index?'list_box_txts':'list_box_txt'">{{ item.title }}</div>
| </div>
| </div>
| </div>
|
| <div v-if="active == 'zx'">
| <van-tabs
| :active="zxactive"
| line-width="15px"
| @change="(e) => change(e, 'zxactive')"
| >
| <van-tab
| v-for="(item, index) in zxtabsList"
| :key="index"
| :name="item.key"
| >
| <template #title>
| <div class="title">{{ item.title }}</div>
| </template>
| </van-tab>
| </van-tabs>
| </div>
|
| <dataList
| :active="active"
| :sousuo="sousuo"
| :zxactive="zxactive"
| :tabsList="tabsList"
| :zxtabsList="zxtabsList"
| />
| </div>
| </template>
|
| <script>
| import dataList from "./data.list.vue";
| export default {
| components: { dataList },
| mounted() {
| this.active = this.$route.query.type || "JP";
| if(this.active == 'DZ'){
| this.typeindex = 2
| }else if(this.active == 'ZX'){
| // this.typeindex = 0
| this.changetype('',0)
| }
| },
| data() {
| return {
| tabsList: [
| { title: this.$t("hj61"), key: "" },
| { title: this.$t("日股"), key: "JP", name: "JP" },
| { title: this.$t("hj621"), key: "DZ", name: "DZ" },
| ],
| zxtabsList: [{ title: this.$t("日股"), key: "JP", name: "JP" }],
| active: "",
| zxactive: "JP",
| sousuo: "",
| typeindex:1,
| };
| },
| methods: {
| changetype(e,i){
| this.typeindex = i
| this.change(e,'active')
| },
| change(e, type) {
| console.log(e,type);
| this[type] = e;
| },
| },
| };
| </script>
|
| <style lang="less" scoped>
| .list_box_txts{
| padding: 12px 24px;
| color: #fff;
| background-color: #185546;
| border-radius: 4px;
| }
| .list{
| display: flex;
| height: 60px;
| align-items: center;
| }
| .list_box{
| display: flex;
| margin-left: 15px;
| }
| .list_box_txt{
| padding: 2px 4px;
| color: #8B8698;
| }
| .title {
| // color: red;
| font-size: 18px;
| // padding: 10px 20px 10px;
| }
| /deep/ .van-tabs--line .van-tabs__wrap {
| height: 50px;
| }
| </style>
|
|