@fit-screen/vue
Version:
Scale-based large-screen adaptive solution for Vue Everything is based on the design draft's px size, and the adaptation is done by scale, everything is so simple
15 lines (14 loc) • 576 B
TypeScript
import type { Scale } from '@fit-screen/shared';
import type { Ref } from 'vue-demi';
export type MaybeRef<T> = T | Ref<T>;
export interface UseFitScreenOptions {
width: MaybeRef<number>;
height: MaybeRef<number>;
mode: MaybeRef<'fit' | 'scrollX' | 'scrollY' | 'full'>;
executeMode: 'throttle' | 'debounce' | 'none';
waitTime: number;
}
export declare const useFitScreen: (options: UseFitScreenOptions, emit: (event: 'scaleChange', payload: Scale) => void) => {
entityRef: Ref<HTMLElement | undefined>;
previewRef: Ref<HTMLElement | undefined>;
};