utils.ts 449 B

1234567891011121314
  1. /** 生成 ModuleCommon 需要的 showStyle,坐标基于 1920 × 1080 设计稿 */
  2. export function panelShowStyle(x: number, y: number, width: number, height: number) {
  3. return {
  4. size: `width:${width}px;height:${height}px;`,
  5. position: `left:${x}px;top:${y}px;`,
  6. };
  7. }
  8. /** 页面模块不需要配置下拉框,给 ModuleCommon 一个最小可用的 moduleData */
  9. export const EMPTY_MODULE_DATA = {
  10. header: {
  11. show: false,
  12. },
  13. };