From 5486a19655456894b088aa6e0307528689cf4bed Mon Sep 17 00:00:00 2001 From: zhangjinlong Date: Thu, 24 Sep 2020 10:20:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20pc=E7=BB=84=E4=BB=B6=E5=8F=AF=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BasicPcShop/common.ts | 63 ++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 src/components/BasicPcShop/common.ts diff --git a/src/components/BasicPcShop/common.ts b/src/components/BasicPcShop/common.ts new file mode 100644 index 0000000..e225d6c --- /dev/null +++ b/src/components/BasicPcShop/common.ts @@ -0,0 +1,63 @@ +import { INumberConfigType, TNumberDefaultType } from '../PanelComponents/FormEditor/types'; + +///提取所有公用设置,传来时加到这里,约定公用类型 +//公用配置需满足条件,所有组件初始值统一,否则不放公用设置 + +export interface ICommonBaseType { + baseTop: TNumberDefaultType; + baseLeft: TNumberDefaultType; + baseRadius: TNumberDefaultType; + baseRotate: TNumberDefaultType; + baseScale: TNumberDefaultType; + baseHeight: TNumberDefaultType; + baseWidth: TNumberDefaultType; + isTpl?: boolean; +} + +export const baseConfig: INumberConfigType[] = [ + { + key: 'baseTop', + name: '纵向位移', + type: 'Number', + }, + { + key: 'baseLeft', + name: '横向位移', + type: 'Number', + }, + { + key: 'baseRadius', + name: '圆角', + type: 'Number', + }, + { + key: 'baseRotate', + name: '旋转', + type: 'Number', + }, + { + key: 'baseScale', + name: '缩放', + type: 'Number', + }, + { + key: 'baseHeight', + name: '容器高度%', + type: 'Number', + }, + { + key: 'baseWidth', + name: '容器宽度%', + type: 'Number', + }, +]; + +export const baseDefault = { + baseTop: 0, + baseLeft: 0, + baseRadius: 0, + baseRotate: 0, + baseScale: 100, + baseHeight: 100, + baseWidth: 100, +};