import type { ExtractPropTypes, PropType } from 'vue'; import zIndex from '../../libs/config/zIndex'; /** * StickyProps 吸顶组件 props 类型定义 * @description 吸顶组件,支持自定义吸顶距离、z-index、背景色等 */ export const StickyProps = { /** 自定义根节点样式 */ customStyle: { type: [String, Object] as PropType>, default: () => ({}) }, /** 自定义根节点样式类 */ customClass: { type: String as unknown as PropType, default: '' }, /** 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px */ offsetTop: { type: [Number, String] as PropType, default: 0 }, /** 列表中的索引值 */ index: { type: [Number, String] as PropType, default: '' }, /** 是否开启吸顶功能 */ enable: { type: Boolean, default: true }, /** h5顶部导航栏的高度 */ h5NavHeight: { type: [Number, String] as PropType, default: 44 }, /** 吸顶区域的背景颜色 */ bgColor: { type: String, default: 'var(--u-bg-white)' }, /** z-index值 */ zIndex: { type: [Number, String] as PropType, default: zIndex.sticky } }; export type StickyProps = ExtractPropTypes;