forked from rc/aircox
continue migration: make website working
This commit is contained in:
31
assets/vue/tab.vue
Normal file
31
assets/vue/tab.vue
Normal file
@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<li @click.prevent="onclick"
|
||||
:class="{'is-active': $parent.value == value}">
|
||||
<slot></slot>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
value: { default: undefined },
|
||||
},
|
||||
|
||||
methods: {
|
||||
select() {
|
||||
this.$parent.selectTab(this);
|
||||
},
|
||||
|
||||
onclick(event) {
|
||||
this.select();
|
||||
/*if(event.target.href != document.location)
|
||||
window.history.pushState(
|
||||
{ url: event.target.href },
|
||||
event.target.innerText + ' - ' + document.title,
|
||||
event.target.href
|
||||
) */
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user