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
| <template>
| <u-tabs
| :list="tabList"
| lineWidth="20"
| lineHeight="7"
| :current="current"
| :activeStyle="{
| color: '#303133',
| fontWeight: 'bold',
| transform: 'scale(1.05)'
| }"
| :inactiveStyle="{
| color: '#606266',
| transform: 'scale(1)'
| }"
| itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;padding-bottom: 15px;"
| @click="handlerClick"
| >
| </u-tabs>
| </template>
|
| <script>
| export default {
| props: {
| tabList: {type: Array,required:true},
| },
| emits: ['toggleTab'],
| data() {
| return {
| current:0
| }
| },
| methods: {
| handlerClick(item) {
| this.setCurrent(item.index)
| this.$emit('toggleTab',item)
| console.log(item,'item')
| },
| setCurrent(index){
| this.current=index
| }
| }
| }
| </script>
|
| <style lang="scss" scoped>
| </style>
|
|