UNPKG

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