fixed #155
This commit is contained in:
梁灏 2017-01-03 10:18:03 +08:00
parent ee975cd4b3
commit 420ef34349
3 changed files with 16 additions and 8 deletions

View file

@ -27,9 +27,6 @@
prefixCls: prefixCls, prefixCls: prefixCls,
show: true show: true
}; };
},
computed: {
}, },
methods: { methods: {
updateNav () { updateNav () {
@ -46,6 +43,9 @@
disabled () { disabled () {
this.updateNav(); this.updateNav();
} }
},
ready () {
this.updateNav();
} }
}; };
</script> </script>

View file

@ -202,9 +202,6 @@
this.updateNav(); this.updateNav();
} }
}, },
compiled () {
this.updateNav();
},
watch: { watch: {
activeKey () { activeKey () {
this.updateBar(); this.updateBar();

View file

@ -1,12 +1,23 @@
<template> <template>
<Tabs active-key="key1"> <i-button @click="add">add</i-button>{{more}}
<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>
</template> </template>
<script> <script>
export default { export default {
data () {
return {
more: false
}
},
methods: {
add () {
this.more = !this.more;
}
}
} }
</script> </script>