@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.182
1
+ 0.0.183
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afeefa/vue-app",
3
- "version": "0.0.182",
3
+ "version": "0.0.183",
4
4
  "description": "",
5
5
  "author": "Afeefa Kollektiv <kollektiv@afeefa.de>",
6
6
  "license": "MIT",
@@ -8,7 +8,7 @@
8
8
  import { Component, Vue } from '@a-vue'
9
9
 
10
10
  @Component({
11
- props: ['title']
11
+ props: ['title', 'icon']
12
12
  })
13
13
  export default class ATab extends Vue {
14
14
  visible = false
@@ -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: .5rem 1rem .7rem;
79
+ padding: .8rem 1.2rem .7rem;
68
80
  background: white;
69
81
  cursor: pointer;
70
82