跳至主要內容

Thisky小于 1 分钟

横向 可以直接设置这个 tab 的宽度 会动态适配

<template>
    <xt-tab
        style="width: 260px; height: 120px"
        :list="tabList"
        v-model="selectTab"
    ></xt-tab>
</template>

纵向 通过 itemClass 或者 itemStyle 控制宽高

<template>
    <xt-tab
        :list="tabList"
        v-model="selectTab"
        mode="col"
        placement="right"
        itemClass="h-16 w-16"
    ></xt-tab>
</template>

属性

属性说明类型默认值
placement气泡框位置,可选 top left right bottom topLeft topRight bottomLeft bottomRight leftTop leftBottom rightTop rightBottostringtop
mode对齐方式 可选 row colstringrow
boxClass样式string
boxStyle样式string
itemClass样式string
itemStyle样式string
modelValuev-model 绑定数据 是选择的数据string
active选择的类名stringxt-active-btn
name自定义数组显示字段名stringname
value自定义数组数据字段名stringvalue
icon自定义数组图标字段名stringicon
tip自定义数组提示字段名stringtip
listtab 循环内容obj[{ name: "2 x 2", value: "card small" }]