# ScheduleTab

# Introduction

import PressScheduleTab from '@tencent/press-plus/press-schedule-tab/press-schedule-tab';

export default {
   components: {
     PressScheduleTab,
   }
}

# Code Demo

# Basic usage

<PressScheduleTab
   :current="currentTab"
   :list="tabList"
   @change="onChangeTab"
/>
export default {
   data() {
     return {
       currentTab: 1,
       tabList: [
         { name: 'Default rule', key: 1 },
         { name: 'Custom rules', key: 2 },
       ],
     }
   },
   methods: {
     onChangeTab(key) {
       this.currentTab = key;
     },
   }
}

# API

# Props

Parameters Description Type Default value
current The key of the current tag string | number -
list tag list array -

# Events

Event name Description Parameters
change switch Tab item.key, item

# list type

type IList = Array<{
   name: string;
   key: string | number;
}>
横屏