|
1 | 1 | <template>
|
2 |
| - <div> |
3 |
| - <div :class="[tabStyle]"> |
4 |
| - <span :class="[tabStyle, 'link-container']" v-for="tab in tabs" :key="tab.label"> |
5 |
| - <!-- Expect this to be either nuxt-link or router-link --> |
6 |
| - <component v-if="linkComponent" |
7 |
| - :is="linkComponent" |
8 |
| - :to="{ query: queryParams(tab.id) }" |
9 |
| - @click.native="$emit('tab-changed', tab)" |
10 |
| - :class="[{ active: tab.id === activeTabId }, tabStyle, tabClass, 'tab-link p-8']" |
11 |
| - > |
12 |
| - {{ tab.label }} |
13 |
| - </component> |
14 |
| - <a v-else-if="tab.href" |
15 |
| - :class="[{ active: tab.id === activeTabId }, tabStyle, tabClass, 'tab-link p-8']" |
16 |
| - :href="tab.href" |
17 |
| - target="_blank" |
18 |
| - > |
19 |
| - {{ tab.label }} |
20 |
| - </a> |
21 |
| - <a |
22 |
| - v-else |
23 |
| - :class="[{ active: tab.id === activeTabId }, tabStyle, tabClass, 'tab-link p-8']" |
24 |
| - @click.prevent="$emit('tab-changed', tab)" |
25 |
| - > |
26 |
| - {{ tab.label }} |
27 |
| - </a> |
28 |
| - </span> |
29 |
| - </div> |
| 2 | + <div class="card-container"> |
| 3 | + <span :class="[tabStyle, 'link-container']" v-for="tab in tabs" :key="tab.label"> |
| 4 | + <!-- Expect this to be either nuxt-link or router-link --> |
| 5 | + <component v-if="linkComponent" |
| 6 | + :is="linkComponent" |
| 7 | + :to="{ query: queryParams(tab.id) }" |
| 8 | + @click.native="$emit('tab-changed', tab)" |
| 9 | + :class="[{ active: tab.id === activeTabId }, tabStyle, tabClass, 'tab-link p-8']" |
| 10 | + > |
| 11 | + {{ tab.label }} |
| 12 | + </component> |
| 13 | + <a v-else-if="tab.href" |
| 14 | + :class="[{ active: tab.id === activeTabId }, tabStyle, tabClass, 'tab-link p-8']" |
| 15 | + :href="tab.href" |
| 16 | + target="_blank" |
| 17 | + > |
| 18 | + {{ tab.label }} |
| 19 | + </a> |
| 20 | + <a |
| 21 | + v-else |
| 22 | + :class="[{ active: tab.id === activeTabId }, tabStyle, tabClass, 'tab-link p-8']" |
| 23 | + @click.prevent="$emit('tab-changed', tab)" |
| 24 | + > |
| 25 | + {{ tab.label }} |
| 26 | + </a> |
| 27 | + </span> |
30 | 28 | <div class="content mt-8 p-16">
|
31 | 29 | <slot />
|
32 | 30 | </div>
|
@@ -106,6 +104,13 @@ export default {
|
106 | 104 | }
|
107 | 105 | .content {
|
108 | 106 | border: 1px solid $lineColor1;
|
| 107 | + background-color: white; |
109 | 108 | overflow: auto;
|
110 | 109 | }
|
| 110 | +.tab-link { |
| 111 | + background-color: white; |
| 112 | +} |
| 113 | +.card-container { |
| 114 | + line-height: normal; |
| 115 | +} |
111 | 116 | </style>
|
0 commit comments