47 lines
		
	
	
		
			927 B
		
	
	
	
		
			Vue
		
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			927 B
		
	
	
	
		
			Vue
		
	
	
<docs>
 | 
						|
---
 | 
						|
order: 4
 | 
						|
title:
 | 
						|
  zh-CN: 附加内容
 | 
						|
  en-US: Extra Content
 | 
						|
---
 | 
						|
 | 
						|
## zh-CN
 | 
						|
 | 
						|
可以在页签右边添加附加操作。
 | 
						|
 | 
						|
## en-US
 | 
						|
 | 
						|
You can add extra actions to the right of Tabs.
 | 
						|
 | 
						|
</docs>
 | 
						|
 | 
						|
<template>
 | 
						|
  <a-tabs v-model:activeKey="activeKey">
 | 
						|
    <a-tab-pane key="1" tab="Tab 1">Content of tab 1</a-tab-pane>
 | 
						|
    <a-tab-pane key="2" tab="Tab 2">Content of tab 2</a-tab-pane>
 | 
						|
    <a-tab-pane key="3" tab="Tab 3">Content of tab 3</a-tab-pane>
 | 
						|
    <template #leftExtra>
 | 
						|
      <a-button class="tabs-extra-demo-button">Left Extra Action</a-button>
 | 
						|
    </template>
 | 
						|
    <template #rightExtra>
 | 
						|
      <a-button>Right Extra Action</a-button>
 | 
						|
    </template>
 | 
						|
  </a-tabs>
 | 
						|
</template>
 | 
						|
<script lang="ts" setup>
 | 
						|
import { ref } from 'vue';
 | 
						|
const activeKey = ref('1');
 | 
						|
</script>
 | 
						|
 | 
						|
<style scoped>
 | 
						|
.tabs-extra-demo-button {
 | 
						|
  margin-right: 16px;
 | 
						|
}
 | 
						|
 | 
						|
.ant-row-rtl .tabs-extra-demo-button {
 | 
						|
  margin-right: 0;
 | 
						|
  margin-left: 16px;
 | 
						|
}
 | 
						|
</style>
 |