You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
< docs >
-- -
order : 3
title :
zh - CN : 滑动
en - US : Slide
-- -
# # zh - CN
可以左右 、 上下滑动 , 容纳更多标签 。
# # en - US
In order to fit in more tabs , they can slide left and right ( or up and down ) .
< / docs >
< template >
< div >
< a -radio -group v -model :value ="mode" : style = "{ marginBottom: '8px' }" >
< a -radio -button value = "top" > Horizontal < / a - r a d i o - b u t t o n >
< a -radio -button value = "left" > Vertical < / a - r a d i o - b u t t o n >
< / a - r a d i o - g r o u p >
< a -tabs
v -model :activeKey ="activeKey"
:tab-position ="mode"
: style = "{ height: '200px' }"
@tabScroll ="callback"
>
< a -tab -pane v-for ="i in 30" :key="i" :tab="`Tab-${i}`">Content of tab {{ i }}</a-tab-pane>
</a-tabs>
</div>
</template>
<script lang="ts" >
import { defineComponent , ref } from ' vue ' ;
import type { TabsProps } from ' ant -design -vue ' ;
export default defineComponent ( {
setup ( ) {
const mode = ref < TabsProps [ ' tabPosition ' ] > ( 'top' ) ;
const activeKey = ref ( 1 ) ;
const callback : TabsProps [ 'onTabScroll' ] = val => {
console . log ( val ) ;
} ;
return {
mode ,
callback ,
activeKey ,
} ;
} ,
} ) ;
< / script >