ant-design-vue/components/tabs/demo/position.vue
2017-12-01 18:48:16 +08:00

39 lines
945 B
Vue

<template>
<div style="width: 500px">
<RadioGroup v-model="tabPosition" style="margin:8px">
<RadioButton value="top">top</RadioButton>
<RadioButton value="bottom">bottom</RadioButton>
<RadioButton value="left">left</RadioButton>
<RadioButton value="right">right</RadioButton>
</RadioGroup>
<Tabs defaultActiveKey="1" :tabPosition="tabPosition">
<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>
</Tabs>
</div>
</template>
<script>
import { Tabs, Radio } from 'antd'
export default {
data () {
return {
tabPosition: 'top',
}
},
methods: {
callback (val) {
console.log(val)
},
},
components: {
Tabs,
TabPane: Tabs.TabPane,
Radio,
RadioGroup: Radio.Group,
RadioButton: Radio.Button,
},
}
</script>