UNPKG

wot-design-uni

Version:

一个基于Vue3+TS开发的uni-app组件库,提供70+高质量组件,支持暗黑模式、国际化和自定义主题。

24 lines (18 loc) 599 B
import type { InjectionKey } from 'vue' import type { ExtractPropTypes } from 'vue' import { makeBooleanProp } from '../common/props' export type AnchorIndex = number | string export const indexBarProps = { /** * @description 索引是否吸顶 */ sticky: makeBooleanProp(false) } export type IndexBarProps = ExtractPropTypes<typeof indexBarProps> export type InderBarProvide = { props: { sticky?: boolean } anchorState: { activeIndex: AnchorIndex | null // 当前激活的索引 } } export const indexBarInjectionKey: InjectionKey<InderBarProvide> = Symbol('wd-index-bar')