add DotButton hover text pos
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<nav class="node-view-child-list" :class="{ 'smartphone': smartphone }">
|
||||
<ul>
|
||||
<li
|
||||
v-for="child in children" :key="child.id"
|
||||
v-for="(child, i) in children" :key="child.id"
|
||||
class="node-view-child-list-item"
|
||||
>
|
||||
<dot-button
|
||||
@@ -10,6 +10,7 @@
|
||||
:variant="child.variant"
|
||||
:active="activeNodes.includes(child.id)"
|
||||
dot-only
|
||||
:pos="smartphone ? getDir(i) : 'left'"
|
||||
>
|
||||
{{ $t('variants.' + child.variant) }}
|
||||
</dot-button>
|
||||
@@ -40,6 +41,13 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
getDir (index) {
|
||||
const len = this.children.length
|
||||
if (index === 0) return 'right'
|
||||
if (index === this.children.length - 1) return 'left'
|
||||
return 'middle'
|
||||
},
|
||||
|
||||
onOpen (childId) {
|
||||
this.$emit('open-child', { childId })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user