|
|
<template>
|
|
|
<div class="channel-tab">
|
|
|
<a v-for="(index, item) in channel" v-bind:class="{focus: index === current}" v-on:click.prevent="changeChannel(index)" href="{{item.url}}">
|
|
|
<a v-for="(index, item) in channel" v-bind:class="{focus: index === current}" v-on:click.prevent="changeChannel(index)" href="/{{item.channel}}">
|
|
|
<span class="name">{{item.name | uppercase}}</span>
|
|
|
</a>
|
|
|
</div>
|
...
|
...
|
@@ -13,33 +13,32 @@ |
|
|
current: 0,
|
|
|
channel: [{
|
|
|
name: 'MEN男士',
|
|
|
url: '/men'
|
|
|
channel: 'men'
|
|
|
}, {
|
|
|
name: 'WOMEN女士',
|
|
|
url: '/women'
|
|
|
channel: 'women'
|
|
|
}, {
|
|
|
name: 'LIFESTYLE生活',
|
|
|
url: '/lifestyle'
|
|
|
channel: 'lifestyle'
|
|
|
}]
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
changeChannel(index) {
|
|
|
this.current = index;
|
|
|
this.$parent.$emit('changeChannel', this.channel[index].channel);
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style>
|
|
|
@import "../../scss/common/color";
|
|
|
|
|
|
.channel-tab {
|
|
|
width: 100%;
|
|
|
height: 90px;
|
|
|
font-size: 24px;
|
|
|
text-align: center;
|
|
|
background: $white;
|
|
|
background: #fff;
|
|
|
|
|
|
a {
|
|
|
display: inline-block;
|
...
|
...
|
@@ -48,7 +47,7 @@ |
|
|
color: #999;
|
|
|
|
|
|
&.focus {
|
|
|
color: $black;
|
|
|
color: #000;
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -56,13 +55,13 @@ |
|
|
padding: 9px 0;
|
|
|
|
|
|
&.focus {
|
|
|
border-bottom: 4px solid $black;
|
|
|
border-bottom: 4px solid #000;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.focus {
|
|
|
.name {
|
|
|
border-bottom: 4px solid $black;
|
|
|
border-bottom: 4px solid #000;
|
|
|
}
|
|
|
}
|
|
|
}
|
...
|
...
|
|