fix(ui): icons for tabs
This commit is contained in:
parent
a55a0ac4e0
commit
819253a8d3
|
@ -27,11 +27,11 @@ watch(() => tabs.length, (to, from) => {
|
|||
<Button
|
||||
v-for="(tab, index) in tabs" :key="tab" :class="{ 'is-active': currentTab === tab }"
|
||||
ghost
|
||||
:icon="icons[index]"
|
||||
@click="currentTab = tab"
|
||||
@keydown.left="currentTab = tabs[(tabs.findIndex(t => t === currentTab) - 1 + tabs.length) % tabs.length]"
|
||||
@keydown.right="currentTab = tabs[(tabs.findIndex(t => t === currentTab) + 1) % tabs.length]" class="tabs-item">
|
||||
<div class="is-spacing">{{ tab }}</div>
|
||||
<label v-if="icons[index]" class="is-icon">{{ icons[index] }}</label>
|
||||
<label>{{ tab }}</label>
|
||||
</Button>
|
||||
|
||||
|
|
Loading…
Reference in New Issue