UNPKG

gtht-miniapp-sdk

Version:

gtht-miniapp-sdk 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库

55 lines (54 loc) 1.64 kB
import { type StyleValue } from 'vue'; import { type MenuOption } from '../menu/common'; import { type NodeRect } from '../../utils'; import { PopoverController } from './usePopover'; import { type Position } from './utils'; export interface PopoverProps { rootStyle?: StyleValue; rootClass?: string; visible?: boolean; options?: MenuOption[]; position?: Position; direction?: 'vertical' | 'horizontal'; theme?: 'dark' | 'light'; refGap?: number; viewportGap?: number; transparent?: boolean; controller?: PopoverController; duration?: number; } export declare const defaultPopoverProps: { position: PopoverProps["position"]; direction: PopoverProps["direction"]; theme: PopoverProps["theme"]; refGap: number; viewportGap: number; transparent: boolean; duration: number; }; export interface PopoverSlots { default?(props: Record<string, never>): any; content?(props: Record<string, never>): any; } export interface PopoverEmits { (e: 'update:visible', visible: boolean): void; (e: 'select', option: MenuOption): void; } export interface ReferenceExpose { getRect: () => NodeRect | Promise<NodeRect> | undefined; } export interface PopoverReferenceProps { rootStyle?: StyleValue; rootClass?: string; } export interface PopoverReferenceSlots { default?(props: Record<string, never>): any; } export interface PopoverReferenceEmits { (e: 'click', event: any): void; } export interface PopoverContext { show: () => void; register: (expose: ReferenceExpose) => void; } export declare const popoverContextSymbol: unique symbol;