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

36 lines
635 B
Vue

<docs>
---
order: 0
title:
zh-CN: 基本用法
en-US: Basic Usage
---
## zh-CN
默认选中第一项
## en-US
Default activate first tab.
</docs>
<template>
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="Tab 1">Content of Tab Pane 1</a-tab-pane>
<a-tab-pane key="2" tab="Tab 2" force-render>Content of Tab Pane 2</a-tab-pane>
<a-tab-pane key="3" tab="Tab 3">Content of Tab Pane 3</a-tab-pane>
</a-tabs>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
export default defineComponent({
setup() {
return {
activeKey: ref('1'),
};
},
});
</script>