123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- import { CompUI } from "./components/CompUI";
- export type ICompKeys = keyof typeof CompUI;
- export type EditorMode = "editPage" | "editComp" | "preview" | "display";
- export type Layout = {
- position?: "absolute";
- visible?: boolean;
- size: [number, number, { unit?: "px" | "%" }?]; // width height wUnit hUnit
- direction?: "top" | "bottom"; // 默认top
- mask?: string;
- alignSelf?: string;
- transform?: {
- r?: number; // rotate
- x?: number; // translateX
- y?: number; // marginTop
- s?: number; // scale
- };
- border?: {
- style?: string;
- width?: number;
- color?: string;
- radius?: number;
- };
- zIndex?: number;
- margin?: string;
- padding?: string;
- transformMatrix?: string;
- opacity?: number;
- radius?: number;
- locked?: boolean;
- background?: Background;
- };
- export type Background = {
- color?: string;
- image?: string;
- imageStyle?: string;
- position?:
- | "bottom"
- | "center"
- | "left"
- | "left-bottom"
- | "left-top"
- | "right"
- | "right-bottom"
- | "right-top"
- | "top";
- repeat?:
- | "repeat"
- | "no-repeat"
- | "repeat-x"
- | "repeat-y"
- | "repeat-round"
- | "repeat-space";
- size?: "auto" | "cover" | "contain";
- clipPath?: string;
- // origin?: "border" | "padding" | "content";
- };
|