mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-15 17:31:43 +08:00
45 lines
1.4 KiB
Vue
45 lines
1.4 KiB
Vue
<template>
|
|
<div style="width: 500px">
|
|
<RadioGroup v-model="mode" :style="{ marginBottom: '8px' }">
|
|
<RadioButton value="top">Horizontal</RadioButton>
|
|
<RadioButton value="left">Vertical</RadioButton>
|
|
</RadioGroup>
|
|
<Tabs defaultActiveKey="1" :tabPosition="mode" :style="{ height: '200px'}" @prevClick="callback" @nextClick="callback">
|
|
<TabPane tab="Tab 1" tabKey="1">Content of tab 1</TabPane>
|
|
<TabPane tab="Tab 2" tabKey="2">Content of tab 2</TabPane>
|
|
<TabPane tab="Tab 3" tabKey="3">Content of tab 3</TabPane>
|
|
<TabPane tab="Tab 4" tabKey="4">Content of tab 4</TabPane>
|
|
<TabPane tab="Tab 5" tabKey="5">Content of tab 5</TabPane>
|
|
<TabPane tab="Tab 6" tabKey="6">Content of tab 6</TabPane>
|
|
<TabPane tab="Tab 7" tabKey="7">Content of tab 7</TabPane>
|
|
<TabPane tab="Tab 8" tabKey="8">Content of tab 8</TabPane>
|
|
<TabPane tab="Tab 9" tabKey="9">Content of tab 9</TabPane>
|
|
<TabPane tab="Tab 10" tabKey="10">Content of tab 10</TabPane>
|
|
<TabPane tab="Tab 11" tabKey="11">Content of tab 11</TabPane>
|
|
</Tabs>
|
|
</div>
|
|
|
|
</template>
|
|
<script>
|
|
import { Tabs, Radio } from 'antd'
|
|
export default {
|
|
data () {
|
|
return {
|
|
mode: 'top',
|
|
}
|
|
},
|
|
methods: {
|
|
callback (val) {
|
|
console.log(val)
|
|
},
|
|
},
|
|
components: {
|
|
Tabs,
|
|
TabPane: Tabs.TabPane,
|
|
Radio,
|
|
RadioGroup: Radio.Group,
|
|
RadioButton: Radio.Button,
|
|
},
|
|
}
|
|
</script>
|