fix tabs classes
This commit is contained in:
parent
69794b900f
commit
ebd321d166
|
@ -4,9 +4,9 @@
|
||||||
<a
|
<a
|
||||||
v-for="(v, index) in inner.children"
|
v-for="(v, index) in inner.children"
|
||||||
href="#"
|
href="#"
|
||||||
|
class="font-semibold hover:text-teal-600 transition-all"
|
||||||
|
:class="{'text-teal-800': inner.active !== index, 'text-teal-600': inner.active === index}"
|
||||||
@click.prevent="navigate(index)"
|
@click.prevent="navigate(index)"
|
||||||
class="text-teal-800 font-semibold hover:text-teal-600 transition-all"
|
|
||||||
:class="{'text-teal-600': inner.active === index}"
|
|
||||||
>
|
>
|
||||||
<span v-text="v"></span>
|
<span v-text="v"></span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -19,6 +19,10 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
|
props: {
|
||||||
|
modelValue: {},
|
||||||
|
},
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
inner: {
|
inner: {
|
||||||
|
@ -28,8 +32,8 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
created() {
|
||||||
modelValue: {},
|
this.inner = this.modelValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -38,9 +42,5 @@ export default {
|
||||||
this.$emit('update:modelValue', this.inner);
|
this.$emit('update:modelValue', this.inner);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
|
||||||
this.inner = this.modelValue;
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue