ant-design-vue/components/tabs/demo/custom-tab-bar.md

37 lines
817 B
Markdown
Raw Normal View History

2018-12-11 12:53:56 +00:00
<cn>
#### 自定义页签头
自定义页签头
</cn>
<us>
#### Customized bar of tab
Customized bar of tab.
</us>
2019-10-09 10:32:23 +00:00
```tpl
2018-12-11 12:53:56 +00:00
<template>
2019-09-28 12:45:07 +00:00
<div>
<a-tabs defaultActiveKey="1">
<a-tab-pane tab="Tab 1" key="1" style="height: 200px">Content of Tab Pane 1</a-tab-pane>
<a-tab-pane tab="Tab 2" key="2" forceRender>Content of Tab Pane 2</a-tab-pane>
<a-tab-pane tab="Tab 3" key="3">Content of Tab Pane 3</a-tab-pane>
<template slot="renderTabBar" slot-scope="props, DefaultTabBar">
<component :is="DefaultTabBar" v-bind="props" :style="{ zIndex: 1, background: '#fff' }" />
</template>
</a-tabs>
</div>
2018-12-11 12:53:56 +00:00
</template>
<script>
2019-09-28 12:45:07 +00:00
export default {
data() {
return {};
},
methods: {
callback(key) {
console.log(key);
},
2018-12-11 12:53:56 +00:00
},
2019-09-28 12:45:07 +00:00
};
2018-12-11 12:53:56 +00:00
</script>
```