|
@@ -6,7 +6,6 @@
|
|
|
:class="[{ 'curr': index == currIndex }]"
|
|
:class="[{ 'curr': index == currIndex }]"
|
|
|
:key="value.tabTitle"
|
|
:key="value.tabTitle"
|
|
|
v-on:click="switchTabs(value, index)"
|
|
v-on:click="switchTabs(value, index)"
|
|
|
- :href="value.href"
|
|
|
|
|
>
|
|
>
|
|
|
<nut-badge
|
|
<nut-badge
|
|
|
:isDot="value.isDot"
|
|
:isDot="value.isDot"
|
|
@@ -43,6 +42,10 @@ export default {
|
|
|
bottom: {
|
|
bottom: {
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
|
default: false
|
|
default: false
|
|
|
|
|
+ },
|
|
|
|
|
+ replace:{
|
|
|
|
|
+ type: Boolean,
|
|
|
|
|
+ default: false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
@@ -73,6 +76,13 @@ export default {
|
|
|
},
|
|
},
|
|
|
switchTabs: function(value, index) {
|
|
switchTabs: function(value, index) {
|
|
|
this.currIndex = index;
|
|
this.currIndex = index;
|
|
|
|
|
+ if(this.replace){ //替换url
|
|
|
|
|
+ window.location.replace(value.href);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ if(value.href){
|
|
|
|
|
+ window.location.href = value.href;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
this.$emit('tab-switch', value, index);
|
|
this.$emit('tab-switch', value, index);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|