UNPKG

@tplc/wot

Version:

88 lines (87 loc) 1.9 kB
import { type ExtractPropTypes, type InjectionKey } from 'vue' import type { TabbarItem } from '../wd-tabbar-item/types' type TabbarShape = 'default' | 'round' export type TabbarProvide = { props: { modelValue?: number | string fixed?: boolean safeAreaInsetBottom?: boolean bordered?: boolean shape?: TabbarShape activeColor?: string inactiveColor?: string placeholder?: boolean zIndex?: number } setChange: (child: TabbarItem) => void } export declare const TABBAR_KEY: InjectionKey<TabbarProvide> export declare const tabbarProps: { /** * 选中标签的索引值或者名称 */ modelValue: { type: (NumberConstructor | StringConstructor)[] default: number } /** * 是否固定在底部 */ fixed: { type: BooleanConstructor default: boolean } /** * 是否显示顶部边框 */ bordered: { type: BooleanConstructor default: boolean } /** * 是否设置底部安全距禿(iPhone X 类型的机型) */ safeAreaInsetBottom: { type: BooleanConstructor default: boolean } /** * 标签栏的形状。可选项:default/round */ shape: { type: import('vue').PropType<TabbarShape> default: TabbarShape } /** * 激活标签的颜色 */ activeColor: StringConstructor /** * 未激活标签的颜色 */ inactiveColor: StringConstructor /** * 固定在底部时,是否在标签位置生成一个等高的占位元素 */ placeholder: { type: BooleanConstructor default: boolean } /** * 自定义组件的层级 */ zIndex: { type: NumberConstructor default: number } customStyle: { type: import('vue').PropType<string> default: string } customClass: { type: import('vue').PropType<string> default: string } } export type TabbarProps = ExtractPropTypes<typeof tabbarProps> export {}