@afeefa/vue-app 0.0.182 → 0.0.183
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.183
|
package/package.json
CHANGED
package/src/components/ATab.vue
CHANGED
package/src/components/ATabs.vue
CHANGED
@@ -8,6 +8,16 @@
|
|
8
8
|
:class="['label', {selected: index === currentIndex}]"
|
9
9
|
@click="setTab(index)"
|
10
10
|
>
|
11
|
+
<template v-if="icons[index]">
|
12
|
+
<a-icon
|
13
|
+
size="1.5rem"
|
14
|
+
:color="icons[index].color"
|
15
|
+
class="mt-n1 mr-1"
|
16
|
+
>
|
17
|
+
{{ icons[index].icon }}
|
18
|
+
</a-icon>
|
19
|
+
</template>
|
20
|
+
|
11
21
|
{{ title }}
|
12
22
|
</div>
|
13
23
|
</div>
|
@@ -27,10 +37,12 @@ import { Component, Vue } from '@a-vue'
|
|
27
37
|
})
|
28
38
|
export default class ATabs extends Vue {
|
29
39
|
titles = []
|
40
|
+
icons = []
|
30
41
|
currentIndex = 0
|
31
42
|
|
32
43
|
mounted () {
|
33
44
|
this.titles = this.$children.map(c => c.title)
|
45
|
+
this.icons = this.$children.map(c => c.icon)
|
34
46
|
|
35
47
|
this.$children[this.currentIndex].show()
|
36
48
|
}
|
@@ -64,7 +76,7 @@ export default class ATabs extends Vue {
|
|
64
76
|
justify-content: center;
|
65
77
|
|
66
78
|
.label {
|
67
|
-
padding: .
|
79
|
+
padding: .8rem 1.2rem .7rem;
|
68
80
|
background: white;
|
69
81
|
cursor: pointer;
|
70
82
|
|