UNPKG

sard-uniapp

Version:

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

683 lines (682 loc) 17.9 kB
import { type StyleValue } from 'vue'; export interface FabProps { rootStyle?: StyleValue; rootClass?: string; top?: string; right?: string; bottom?: string; left?: string; color?: string; background?: string; icon?: string; visibleIcon?: string; iconFamily?: string; itemList?: FabItem[]; hideName?: boolean; overlayClosable?: boolean; duration?: number; draggable?: boolean; axis?: 'x' | 'y' | 'both' | 'none'; magnet?: 'x' | 'y'; gapX?: number; gapY?: number; offset?: { x: number; y: number; }; navbarHeight?: number; tabbarHeight?: number; } export declare const defaultFabProps: () => { itemList: () => never[]; rootStyle?: (string | false | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => string | false | import("vue").CSSProperties | StyleValue[]) | null) | undefined; rootClass?: (string | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => string)) | undefined; top?: (string | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => string)) | undefined; right?: (string | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => string)) | undefined; bottom?: (string | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => string)) | undefined; left?: (string | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => string)) | undefined; color?: (string | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => string)) | undefined; background?: (string | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => string)) | undefined; icon?: (string | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => string)) | undefined; visibleIcon?: (string | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => string)) | undefined; iconFamily?: (string | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => string)) | undefined; hideName?: (boolean | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => boolean)) | undefined; overlayClosable?: (boolean | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => boolean)) | undefined; duration?: (number | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => number)) | undefined; draggable?: (boolean | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => boolean)) | undefined; axis?: ("x" | "y" | "none" | "both" | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => "x" | "y" | "none" | "both")) | undefined; magnet?: ("x" | "y" | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => "x" | "y")) | undefined; gapX?: (number | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => number)) | undefined; gapY?: (number | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => number)) | undefined; offset?: ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => { x: number; y: number; }) | undefined; navbarHeight?: (number | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => number)) | undefined; tabbarHeight?: (number | ((props: { rootStyle: StyleValue; rootClass: string; top: string; right: string; bottom: string; left: string; color: string; background: string; icon: string; visibleIcon: string; iconFamily: string; itemList: FabItem[]; hideName: boolean; overlayClosable: boolean; duration: number; draggable: boolean; axis: "x" | "y" | "both" | "none"; magnet: "x" | "y"; gapX: number; gapY: number; offset: { x: number; y: number; }; navbarHeight: number; tabbarHeight: number; }) => number)) | undefined; }; export interface FabSlots { default?(props: { visible: boolean; }): any; list?(props: { onItemClick: (item: FabItem, index: number) => void; }): any; } export interface FabEmits { (e: 'click', event: any): void; (e: 'select', item: FabItem, index: number): void; (e: 'update:offset', offset: { x: number; y: number; }): void; } export interface FabItem { name?: string; color?: string; background?: string; icon?: string; iconFamily?: string; [key: PropertyKey]: any; } export interface FabContext { hideName?: boolean; visible?: boolean; isLeft?: boolean; onItemClick: (item: FabItem, index: number) => void; } export declare const fabContextSymbol: unique symbol;