add forceRender

pull/9/head
tangjinzhou 7 years ago
parent 00522b0bba
commit 7b92db786f

@ -4,7 +4,7 @@
:aria-hidden="active ? 'false' : 'true'" :aria-hidden="active ? 'false' : 'true'"
:class="classes" :class="classes"
> >
<slot v-if="isRender"> <slot v-if="isRender || forceRender">
</slot> </slot>
</div> </div>
</template> </template>
@ -16,6 +16,7 @@ export default {
tab: [String, Number, Function], tab: [String, Number, Function],
disabled: Boolean, disabled: Boolean,
closable: Boolean, closable: Boolean,
forceRender: Boolean,
}, },
data () { data () {
return { return {

@ -1,7 +1,7 @@
<template> <template>
<Tabs defaultActiveKey="1" @change="callback"> <Tabs defaultActiveKey="1" @change="callback">
<TabPane tab="Tab 1" tabKey="1">Content of Tab Pane 1</TabPane> <TabPane tab="Tab 1" tabKey="1">Content of Tab Pane 1</TabPane>
<TabPane tab="Tab 2" tabKey="2">Content of Tab Pane 2</TabPane> <TabPane tab="Tab 2" tabKey="2" forceRender>Content of Tab Pane 2</TabPane>
<TabPane tab="Tab 3" tabKey="3">Content of Tab Pane 3</TabPane> <TabPane tab="Tab 3" tabKey="3">Content of Tab Pane 3</TabPane>
</Tabs> </Tabs>
</template> </template>

Loading…
Cancel
Save