ant-design-vue/components/tabs/demo/extra.vue
2018-01-23 18:55:39 +08:00

32 lines
767 B
Vue

<template>
<div>
<Tabs :tabBarExtraContent="operations">
<TabPane tab="Tab 1" key="1">Content of tab 1</TabPane>
<TabPane tab="Tab 2" key="2">Content of tab 2</TabPane>
<TabPane tab="Tab 3" key="3">Content of tab 3</TabPane>
</Tabs>
<Tabs>
<TabPane tab="Tab 1" key="1">Content of tab 1</TabPane>
<TabPane tab="Tab 2" key="2">Content of tab 2</TabPane>
<TabPane tab="Tab 3" key="3">Content of tab 3</TabPane>
<a-button slot="tabBarExtraContent">Extra Action</a-button>
</Tabs>
</div>
</template>
<script>
import { Tabs, Button } from 'antd'
export default {
methods: {
operations (h) {
return h('span', [<Button>Extra Action</Button>])
},
},
components: {
Tabs,
TabPane: Tabs.TabPane,
},
}
</script>