zgg-ui
Version:
2.0.1 正式版本 基于 Vue 3、UniApp 和 TypeScript 开发的多端适配移动端 UI 组件库,旨在提供丰富的组件集合,帮助开发者快速构建多端响应式的移动应用界面
31 lines (27 loc) • 810 B
text/typescript
import { propsHook, PropsTypeHook } from '../../libs/zHooks'
import { InjectionKey } from 'vue'
type noticeBarScrollDirection = 'horizontal' | 'vertical'
interface PropsType extends PropsTypeHook {
show?: boolean
data?: Array<string>
bgColor?: string
textColor?: string
fontSize?: string | number
leftIcon?: string
leftIconColor?: string
leftIconSize?: string | number
rightIcon?: string
rightIconColor?: string
rightIconSize?: string | number
pause?: boolean
autoPlay?: boolean
direction?: noticeBarScrollDirection
loop?: boolean
speed?: number
autoHide?: boolean
}
export type NoticeBarContext = PropsType & {
play: boolean
click: (index: number) => void
}
export const noticeBarKey: InjectionKey<NoticeBarContext> = Symbol('noticeBar')