UNPKG

@varlet/ui

Version:

A Vue3 component library based on Material Design 2 and 3, supporting mobile and desktop.

42 lines (30 loc) 934 B
import { TeleportProps, VNode } from 'vue' import { BasicAttributes, SetPropsDefaults, VarComponent } from './varComponent' export type DragDirection = 'x' | 'y' | 'xy' export type DragAttraction = 'x' | 'y' | 'xy' export interface DragBoundary { top?: number | string bottom?: number | string left?: number | string right?: number | string } export declare const dragProps: Record<keyof DragProps, any> export interface DragProps extends BasicAttributes { direction?: DragDirection attraction?: DragAttraction disabled?: boolean boundary?: DragBoundary zIndex?: string | number teleport?: TeleportProps['to'] | false onClick?: ListenerProp<(event: Event) => void> } export class Drag extends VarComponent { static setPropsDefaults: SetPropsDefaults<DragProps> $props: DragProps $slots: { default(): VNode[] } resize(): void reset(): void } export class _DragComponent extends Drag {}