/** * 背景模形 * * backgroundColor {String} {color} * backgroundImage {String} url(xxx)|linear-gradient(xxx)|url(xxx),linear-gradient(xxx) * */ export interface BackgroundAttribute { label: string; key: string; backgroundColor: string; backgroundImage: string; backgroundRepeat: 'repeat' | 'no-repeat' | 'repeat-x' | 'repeat-y' | ''; backgroundPositionX: 'left' | 'center' | 'right' | ''; backgroundPositionY: 'top' | 'center' | 'bottom' | ''; backgroundSize: 'auto' | '100%' | '100% 100%' | 'cover' | 'contain' | ''; backgroundAttachment: 'scroll' | 'fixed'; opacity: number; } export type BackgroundSizeProp = BackgroundAttribute['backgroundSize']; export type BackgroundRepeatProp = BackgroundAttribute['backgroundRepeat']; export type BackgroundPositionXProp = BackgroundAttribute['backgroundPositionX']; export type BackgroundPositionYProp = BackgroundAttribute['backgroundPositionY']; export type BackgroundAttachmentProp = BackgroundAttribute['backgroundAttachment']; /** * 背景图片位置 * TILE = 0 平铺; * SOURCE = 1原图; * FILL = 2 填充; * DRAW = 3 拉伸; * PROPORTION = 4等比例; * mini app 默认3拉伸 */ export declare enum BackgroundRepeatEnum { /** * 平铺 */ TILE = 0, /** * 原图 */ SOURCE = 1, /** * 填充 */ FILL = 2, /** * 拉伸 */ DRAW = 3, /** * 等比例 */ PROPORTION = 4 } export declare enum BackgroundPosEnum { leftTop = 13, centerTop = 8, rightTop = 14, leftCenter = 6, centerCenter = 0, rightCenter = 7, leftBottom = 15, centerBottom = 9, rightBottom = 16 } export declare enum RepeatEnum { repeat = "repeat", noRepeat = "no-repeat", repeatX = "repeat-x", repeatY = "repeat-y" } export declare enum PositionEnum { left = "left", center = "center", right = "right", top = "top", bottom = "bottom" } export declare enum PositionX { left = "left", center = "center", right = "right" } export declare enum PositionY { center = "center", top = "top", bottom = "bottom" } export declare enum AttachmentEnum { scroll = "scroll", fixed = "fixed" } export declare enum BackgroundSizeEnum { auto = "auto", scaling = "100% 100%", fill = "cover", contain = "contain", zoom = "100%" }