parent
12bd19d7a8
commit
0c5e01f1a8
2 changed files with 9 additions and 10 deletions
|
@ -172,7 +172,6 @@
|
||||||
const nav = this.navList[index];
|
const nav = this.navList[index];
|
||||||
if (nav.disabled) return;
|
if (nav.disabled) return;
|
||||||
this.activeKey = nav.key;
|
this.activeKey = nav.key;
|
||||||
this.updateStatus();
|
|
||||||
this.$emit('on-click', nav.key);
|
this.$emit('on-click', nav.key);
|
||||||
},
|
},
|
||||||
handleRemove (index) {
|
handleRemove (index) {
|
||||||
|
@ -205,6 +204,7 @@
|
||||||
watch: {
|
watch: {
|
||||||
activeKey () {
|
activeKey () {
|
||||||
this.updateBar();
|
this.updateBar();
|
||||||
|
this.updateStatus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,22 +1,21 @@
|
||||||
<template>
|
<template>
|
||||||
<i-button @click="add">add</i-button>{{more}}
|
<Tabs :active-key.sync="activeKey" :animated="true">
|
||||||
<Tabs active-key="key1" type="card" closable>
|
<Tab-pane label="标签一" key="key1">标签一的内容</Tab-pane>
|
||||||
<tab-pane label="标签一" key="key1">标签一的内容</tab-pane>
|
<Tab-pane label="标签二" key="key2">标签二的内容</Tab-pane>
|
||||||
<tab-pane label="标签二" key="key2">标签二的内容</tab-pane>
|
<Tab-pane label="标签三" key="key3">标签三的内容</Tab-pane>
|
||||||
<tab-pane label="标签三" key="key3">标签三的内容</tab-pane>
|
|
||||||
<tab-pane label="标签四" key="key4" v-if="more">标签四的内容</tab-pane>
|
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
<i-button @click="change">change</i-button>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
more: false
|
activeKey: 'key2'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
add () {
|
change () {
|
||||||
this.more = !this.more;
|
this.activeKey = 'key1';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue