@opensig/opendesign
Version:
<p align="center"><img src="../docs/public/opendesign-logo-light.png"/></p> <h1 align="center">opendesign</h1> <p align="center">一个 Vue 3 组件库</p> <p align="center"><b>皮肤可定制,使用 TypeScript</b></p>
92 lines (91 loc) • 2.1 kB
TypeScript
import { ExtractPropTypes, PropType } from 'vue';
type PreviewCloseType = 'none' | 'button' | 'mask' | 'body';
export declare const figureProps: {
/**
* 地址
*/
src: {
type: StringConstructor;
required: boolean;
};
/**
* 长宽比
*/
ratio: {
type: NumberConstructor;
};
/**
* 填充方式 cover | contain | fill | none | scale-down
*/
fit: {
type: StringConstructor;
};
/**
* img alt
*/
alt: {
type: StringConstructor;
};
/**
* 使用背景
*/
background: {
type: BooleanConstructor;
};
/**
* 可hover
*/
hoverable: {
type: BooleanConstructor;
};
/**
* 链接跳转
*/
href: {
type: StringConstructor;
};
/**
* 预置随机多彩背景
*/
colorful: {
type: BooleanConstructor;
};
/**
* 预览
*/
preview: {
type: BooleanConstructor;
};
/**
* 支持通过实例接口调用预览
*/
lazyPreiew: {
type: BooleanConstructor;
};
/**
* 视频预览图
*/
videoPoster: {
type: BooleanConstructor;
};
/**
* 关闭预览方式
*/
previewClose: {
type: PropType<PreviewCloseType | PreviewCloseType[]>;
};
/**
* 图片懒加载
* [false]: 立即加载
* [true]: 启用懒加载,根据与视口的位置关系判断是否加载图片
* 1. background为false时,使用原生img loading=lazy判断是否加载
* 2. background为true时,使用IntersectionObserver检测是否进入视口,加载图片
* [IntersectionObserverInit]: { root, rootMargin, threshold },指定使用IntersectionObserver检测是否进入视口
* 配置参见 https://developer.mozilla.org/zh-CN/docs/Web/API/IntersectionObserver/IntersectionObserver
*/
lazy: {
type: PropType<boolean | IntersectionObserverInit>;
};
};
export type FigurePropsT = ExtractPropTypes<typeof figureProps>;
export {};