index.vue
1.57 KB
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
<template>
<div class="self-regulating">
<nafm-header navClass="nafmii-head-bg3">
<template slot="bottom">
<SearchInput :placeholder="$t('home.searchPlaceholder')" />
<div class="nav-placeholder"></div>
</template>
</nafm-header>
<van-tabs v-model="active" animated scrollspy swipe-threshold="3" class="data-tabs">
<van-tab :title="item.name" v-for="(item,idx) in tabs" :key="idx">
<DataListLayout :tab="item" />
</van-tab>
</van-tabs>
</div>
</template>
<script>
import SearchInput from '@/components/SearchInput'
import DataListLayout from './components/DataListLayout'
export default {
name: 'SelfRegulating',
components: { SearchInput, DataListLayout },
data () {
return {
active: 0,
tabs: []
}
},
methods: {
handleTabs () {
setTimeout(() => {
this.tabs = [
{ id: 1, name: '全部' },
{ id: 2, name: '会员管理' },
{ id: 3, name: '产品创新' },
{ id: 4, name: '注册发行' },
{ id: 5, name: '后续管理' },
{ id: 6, name: '其他' },
]
}, 100);
}
},
mounted () {
this.handleTabs()
}
}
</script>
<style lang="less" scoped>
@import '~@/assets/css/tabsmixin.less';
@PlaceholderHeight: 43px;
.self-regulating {
height: 100%;
display: flex;
flex-direction: column;
.nav-placeholder {
height: @PlaceholderHeight;
width: 100%;
}
.data-tabs {
flex: 1;
z-index: 10;
margin-top: -@PlaceholderHeight;
display: flex;
flex-direction: column;
}
}
</style>