ant-design-vue/components/tabs/demo/extra.vue

32 lines
767 B
Vue
Raw Normal View History

2017-12-01 10:48:16 +00:00
<template>
2017-12-07 07:05:33 +00:00
<div>
2017-12-01 10:48:16 +00:00
<Tabs :tabBarExtraContent="operations">
2017-12-08 03:46:53 +00:00
<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>
2017-12-01 10:48:16 +00:00
</Tabs>
2017-12-07 07:05:33 +00:00
<Tabs>
2017-12-08 03:46:53 +00:00
<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>
2018-01-23 10:55:39 +00:00
<a-button slot="tabBarExtraContent">Extra Action</a-button>
2017-12-07 07:05:33 +00:00
</Tabs>
</div>
2017-12-01 10:48:16 +00:00
</template>
<script>
import { Tabs, Button } from 'antd'
export default {
methods: {
operations (h) {
return h('span', [<Button>Extra Action</Button>])
},
},
components: {
Tabs,
TabPane: Tabs.TabPane,
2018-01-23 10:55:39 +00:00
2017-12-01 10:48:16 +00:00
},
}
</script>