update the master branch to the latest

This commit is contained in:
梁灏 2019-08-27 09:42:40 +08:00
parent 67d534df27
commit 23a0ba9831
611 changed files with 122648 additions and 0 deletions

View file

@ -0,0 +1,80 @@
<template>
<div :class="prefixCls" v-if="show" :style="contentStyle"><slot></slot></div>
</template>
<script>
const prefixCls = 'ivu-tabs-tabpane';
export default {
name: 'TabPane',
inject: ['TabsInstance'],
props: {
name: {
type: String
},
label: {
type: [String, Function],
default: ''
},
icon: {
type: String
},
disabled: {
type: Boolean,
default: false
},
closable: {
type: Boolean,
default: null
},
// Tabs tab Tabs name
tab: {
type: String
},
// TabPane 使 v-if index
// 0
index: {
type: Number
}
},
data () {
return {
prefixCls: prefixCls,
show: true,
currentName: this.name
};
},
computed: {
contentStyle () {
return {
visibility: this.TabsInstance.activeKey !== this.currentName ? 'hidden' : 'visible'
};
}
},
methods: {
updateNav () {
this.TabsInstance.updateNav();
}
},
watch: {
name (val) {
this.currentName = val;
this.updateNav();
},
label () {
this.updateNav();
},
icon () {
this.updateNav();
},
disabled () {
this.updateNav();
}
},
mounted () {
this.updateNav();
},
destroyed () {
this.updateNav();
}
};
</script>