1.0.0 • Published 2 years ago

@dj-ui/dj-tabbar v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

TabsView

参数说明类型默认值是否必传
height高度 (单位:rpx)Number90false
color字体颜色String#333333false
activeColor激活状态下字体颜色String#E0BC75false
activeIcon激活状态下图标(展示在 tab 下方)String-false
layout排列方式 (center:居中对齐方式 ;between:两端对齐 ; left:左对齐 ;right:右对齐)Stringcenterfalse
margin间距Number0false
dataSource数据 (type:' sort' 展示排序按钮) { name:'销量' ,type:' sort' 展示排序按钮 }Arrary[]true
active激活下标Number0false
tabClicktab 点击回调 { active, data, sortIndex}Function-false
<template>
  <TabsView
    :dataSource="dataSource"
    :margin="10"
    layout="left"
    @tabClick="tabClick($event)"
  ></TabsView>
</template>

<script>
import TabsView from "@/components/TabsView";
export default {
  data() {
    return {
      dataSource: [
        { name: "上新" },
        { name: "销量" },
        { name: "价格", type: "sort" },
      ],
    };
  },
  components: {
    TabsView,
  },
  methods: {
    tabClick(ev) {
      console.log(ev);
    },
  },
};
</script>