Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

nuke-tabbar

nuke182Apache-2.02.3.12

带导航切换的tab组件

nuke, tabbar

readme

Tabbar

  • category: UI
  • chinese: Tab切换
  • type: UI Component

Usage

tab toggle, commonly used in the entire layout framework of the business.

API

Tabbar

Props Description Type Default
itemStyle customized tabbar-item style, will override the default style, through this field, you can customize the width, height and layout of the tab navigation bar object false
style Customize the style of the tabbar container and override the default style object false
navTop The position of the navigation, default value is bottom, also can be adjusted to the top boolean false
navStyle custom tab title bar styles need to be imported{active: {style...}, inactive: {style...}} active corresponding selection styles, inactive unchecks the style object false
navScrollable navigation scrolls? If it can scroll, you don't limit the tab width and scroll horizontally. If it can't scroll, each child element flex =1 is equal to the parent container width boolean false
iconBar with icon boolean false
activeKey (Necessary) used to open and switch to the specified tab and receive the tab value string false
asFramework use this as a framework to start this item. It needs the business side to control the shouldComponentUpdate event so that it will be optimized. Otherwise, it will be used as a simple container component, so that props change will be filtration controled. boolean false
onChange(embed mode invalid) prevTab and nextTab are thrown when tab is switched, and props is not triggered manually funtion false customChange(embed mode invalid)
customFocus(embed mode invalid) Defining the intersection point of hook. This method is implemented when tabbar is switched, default method is onFoucs. The changeTo can be defined directly in tabContent. When tab is switched, true is cut into false. string false

Watching

  • Change state, props does not take effect Default setting of asFrameworkis false and non tabbar state changes will be filtered, in order to improve the performance of the effect. If the user needs to control the component through state changes, set it to true.
  • embed mode When Tabbar.item sets the SRC property, the embed mode is enabled. The mode H5 shows the use of iframe loading pages. Native shows the ability to load modules with embed loaded with jsBundle. But not all app supported embed mode, so please fully self-test before use.

Tabbar.Item

Props Description Type Default
render Custom rendering function, item will be imported whether the current belongs to the active state of status, the current tabkey as the parameter function null
tabKey (necessary)define the key of this tabbar string null
preventDefaultEvent defines whether to disable default events boolean null
num the numbers revealed, follow the title of tab, show way: title(num) string null
onPress handler event after clicking function null
title revealing copy string null
icon if tabbar sets iconbar=true, so it valids here, {src: 'xxx',selected:'xxx',size:'small/medium/large',style:{}} object null
src(enable embed mode) define being loaded jsbundle url string null

1.0.0 later, tabbar remove the scrollable effect if still need, please refer nuke-biz-ep-tabbar.

The Other

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

2.3.12 (2019-09-26)

Bug Fixes

2.3.11 (2019-09-26)

Bug Fixes

2.3.10 (2019-09-26)

Note: Version bump only for package nuke-tabbar

2.3.9 (2019-09-26)

Bug Fixes

  • fix tabbar in jsservice mode (e266c6a)

2.3.8 (2019-09-25)

Bug Fixes

2.3.7 (2019-07-24)

Note: Version bump only for package nuke-tabbar

2.3.6 (2019-07-19)

Note: Version bump only for package nuke-tabbar

2.3.5 (2019-07-02)

Note: Version bump only for package nuke-tabbar

2.3.4 (2019-05-10)

Note: Version bump only for package nuke-tabbar

2.3.3 (2019-04-28)

Note: Version bump only for package nuke-tabbar

2.3.2 (2019-01-15)

Note: Version bump only for package nuke-tabbar

2.3.1 (2019-01-15)

Note: Version bump only for package nuke-tabbar

2.3.0 (2018-11-14)

Bug Fixes

Features

  • 将UI组件与功能库拆分 (f5d0a2c)

2.2.29 (2018-10-09)

Bug Fixes

  • fix en.md api (75eec59)
  • fix location bug in js service mode (833db7b)

2.2.28 (2018-10-09)

Note: Version bump only for package nuke-tabbar

2.2.27 (2018-10-08)

Bug Fixes

  • add compat code to support weex 0.18 & qn (7cd7c3e)

2.2.26 (2018-10-08)

Note: Version bump only for package nuke-tabbar

2.2.25 (2018-10-08)

Note: Version bump only for package nuke-tabbar

2.2.24 (2018-10-08)

Note: Version bump only for package nuke-tabbar

2.2.23 (2018-10-08)

Note: Version bump only for package nuke-tabbar

2.2.22 (2018-10-08)

Note: Version bump only for package nuke-tabbar

2.2.21 (2018-10-08)

Note: Version bump only for package nuke-tabbar

2.2.20 (2018-10-08)

Note: Version bump only for package nuke-tabbar

2.2.19 (2018-10-08)

Note: Version bump only for package nuke-tabbar

2.2.18 (2018-09-30)

Note: Version bump only for package nuke-tabbar

2.2.17 (2018-09-26)

Note: Version bump only for package nuke-tabbar

2.2.16 (2018-09-19)

Note: Version bump only for package nuke-tabbar

2.2.15 (2018-09-19)

Note: Version bump only for package nuke-tabbar

2.2.14 (2018-09-11)

Note: Version bump only for package nuke-tabbar

2.2.13 (2018-09-11)

Note: Version bump only for package nuke-tabbar

2.2.12 (2018-09-11)

Note: Version bump only for package nuke-tabbar

2.2.11 (2018-09-06)

Note: Version bump only for package nuke-tabbar

2.2.10 (2018-09-06)

Note: Version bump only for package nuke-tabbar

2.2.9 (2018-09-06)

Note: Version bump only for package nuke-tabbar

2.2.8 (2018-09-05)

Note: Version bump only for package nuke-tabbar

2.2.7 (2018-09-05)

Note: Version bump only for package nuke-tabbar

2.2.6 (2018-09-04)

Note: Version bump only for package nuke-tabbar

2.2.5 (2018-09-04)

Note: Version bump only for package nuke-tabbar

2.2.4 (2018-09-04)

Note: Version bump only for package nuke-tabbar

2.2.3 (2018-08-24)

Note: Version bump only for package nuke-tabbar

2.2.2 (2018-08-23)

Note: Version bump only for package nuke-tabbar

2.2.1 (2018-08-23)

Note: Version bump only for package nuke-tabbar

2.2.0 (2018-08-23)

Bug Fixes

Features

2.1.10 (2018-08-20)

Note: Version bump only for package nuke-tabbar

2.1.9 (2018-08-20)

Note: Version bump only for package nuke-tabbar

2.1.8 (2018-08-20)

Note: Version bump only for package nuke-tabbar

2.1.6 (2018-08-15)

Note: Version bump only for package nuke-tabbar

2.1.4 (2018-08-15)

Note: Version bump only for package nuke-tabbar

2.1.3 (2018-08-15)

Note: Version bump only for package nuke-tabbar

2.1.1 (2018-08-15)

Note: Version bump only for package nuke-tabbar