UNPKG

1.5 kBTypeScriptView Raw
1import { ComponentType } from 'react'
2import { StandardProps, CommonEventFunction } from './common'
3
4interface NavigationBarProps extends StandardProps {
5 /** 导航条标题
6 * @supported weapp
7 */
8 title?: string
9
10 /** 是否在导航条显示 loading 加载提示
11 * @supported weapp
12 */
13 loading?: boolean
14
15 /** 导航条前景颜色值,包括按钮、标题、状态栏的颜色,仅支持 #ffffff 和 #000000
16 * @supported weapp
17 */
18 frontColor?: string
19
20 /** 导航条背景颜色值,有效值为十六进制颜色
21 * @supported weapp
22 */
23 backgroundColor?: string
24
25 /** 改变导航栏颜色时的动画时长,默认为 0 (即没有动画效果)
26 * @default 0
27 * @supported weapp
28 */
29 colorAnimationDuration?: string
30
31 /** 改变导航栏颜色时的动画方式,支持 linear 、 easeIn 、 easeOut 和 easeInOut
32 * @default "linear"
33 * @supported weapp
34 */
35 colorAnimationTimingFunc?: 'linear' | 'easeIn' | 'easeOut' | 'easeInOut'
36}
37
38/** 页面导航条配置节点,用于指定导航栏的一些属性。只能是 PageMeta 组件内的第一个节点,需要配合它一同使用。
39 * 通过这个节点可以获得类似于调用 Taro.setNavigationBarTitle Taro.setNavigationBarColor 等接口调用的效果。
40 * @supported weapp
41 * @see https://developers.weixin.qq.com/miniprogram/dev/component/open-data.html
42 */
43declare const NavigationBar: ComponentType<NavigationBarProps>
44
45export { NavigationBar, NavigationBarProps }