0.0.4 • Published 2 years ago

fire-components-taro v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Fire Components

仅适配了微信小程序。

1. 组件

1.1 TabBar

创建底部导航栏容器的组件。

用法

import { FireTabBar } from "fire-components-taro";
import "fire-components-taro/dist/styles/components/TabBar/TabBar.scss";

<FireTabBar needToolBar>Content</FireTabBar>

参数说明

参数说明类型默认值
needToolBar是否需要展示工具栏(home bar)Booleanfalse

2. Hooks

2.1 useBarHeight

用于获取微信小程序页面中各个 bar 的高度。

用法

const {       
  statusBarHeight,
  toolBarHeight,
  navigationBarHeight,
  navigationBarContentPadding,
  viewHeight,
  tabBarHeight, 
} = useBarHeight()

参数说明

无需参数。

返回值说明

类型说明
statusBarHeightNumber状态栏高度
toolBarHeightNumber工具栏高度(Home Bar)
navigationBarHeightNumber导航栏高度
navigationBarContentPaddingNumber胶囊菜单距右侧的距离
viewHeightNumber内容可呈现的高度,即页面除去 statusBar、toolBar、以及 tabBar 的高度
tabBarHeightNUmbertabBar 高度
0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago