Tab

优质
小牛编辑
118浏览
2023-12-01

底部的标签按钮

使用方法

一般ion-tab都有一个[root]值来加载该组件。

  1. <ion-tabs>
  2. <ion-tab [root]="chatRoot" tabTitle="Chat" tabIcon="chat"><ion-tab>
  3. </ion-tabs>
  4. import {Chat} from '../chat/chat';
  5. export class Tabs {
  6. constructor(){
  7. // here we'll set the property of chatRoot to
  8. // the imported class of Chat
  9. this.chatRoot = Chat
  10. }
  11. }

输入

属性名称类型描述
rootPage设置根页面
rootParamsobject传递数据到该页面
tabTitlestring页面标题
tabIconstring页面图标
tabBadgestring设置徽章
tabBadgeStylestring设置徽章颜色

输出事件

  • select

    选中时触发。