2017-12-01 18:48:16 +08:00
|
|
|
<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">
|
2017-12-08 11:46:53 +08: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 18:48:16 +08:00
|
|
|
</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>
|