UNPKG

@tplc/wot

Version:

89 lines (88 loc) 1.92 kB
import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue' export type FabType = 'primary' | 'success' | 'info' | 'warning' | 'error' | 'default' export type FabPosition = 'left-top' | 'right-top' | 'left-bottom' | 'right-bottom' export type FabDirection = 'top' | 'right' | 'bottom' | 'left' export type FabGap = Partial<Record<FabDirection, number>> export declare const fabProps: { /** * 是否激活 */ active: { type: BooleanConstructor default: boolean } /** * 类型,可选值为 default primary info success warning error */ type: { type: PropType<FabType> default: FabType } /** * 悬浮按钮位置,可选值为 left-top right-top left-bottom right-bottom */ position: { type: PropType<FabPosition> default: FabPosition } /** * 悬浮按钮菜单弹出方向,可选值为 top bottom left right */ direction: { type: PropType<FabDirection> default: FabDirection } /** * 是否禁用 */ disabled: { type: BooleanConstructor default: boolean } /** * 悬浮按钮未展开时的图标 */ inactiveIcon: { type: PropType<string> default: string } /** * 悬浮按钮展开时的图标 */ activeIcon: { type: PropType<string> default: string } /** * 自定义悬浮按钮层级 */ zIndex: { type: NumberConstructor default: number } /** * 是否可拖动 */ draggable: { type: BooleanConstructor default: boolean } gap: { type: PropType<FabGap> default: () => {} } customStyle: { type: PropType<string> default: string } customClass: { type: PropType<string> default: string } } export type FabProps = ExtractPropTypes<typeof fabProps> export type FabExpose = { open: () => void close: () => void } export type FabInstance = ComponentPublicInstance<FabProps, FabExpose>