UNPKG

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