UNPKG

grid-component-editor

Version:

延长loading超时时间;转义伪类中文,防止乱码

67 lines (57 loc) 1.77 kB
// 编辑器主题区域的尺寸 这里需要同步variable.less export const LeftBoxWidth = 100 export const FoldedLeftBoxWidth = 60 export const RightBoxWidth = 220 export const FoldedRightBoxWidth = 60 export const ModeStatus = { DISPLAY: 'display', EDIT: 'edit', } // 事件代理索引 export const DOMCaptureOperate = { DELETE: 'GE-delete', FOCUS: 'GE-focus', PREVIEW: 'GE-preview', RECALL: 'GE-recall', RESET: 'GE-reset', CANCEL_PREVIEW: 'GE-cancel-preview', GLOBAL_SETTING: 'GE-setting', SAVE: 'GE-save', } export const StatusProps = (isEditting: boolean) => ({ cols: { lg: 24, md: 24, sm: 12, xs: 4, xxs: 2 }, style: { minHeight: 300 }, droppingItem: { i: 't', w: 4, h: 2, }, draggableCancel: 'GE-cancel-drag', compactType: null, isDraggable: isEditting, isResizable: isEditting, isDroppable: isEditting, preventCollision: true }) export const createConfigurableDict = (label: string, value: string, placeholder?: string) => ({ label, value, placeholder }) export const Measure = { sum: '汇总', count: '数量', avg: '平均', max: '最大值', min: '最小值' } export const MeasureOptions = Object.entries(Measure).map(([value, label]) => createConfigurableDict(label, value)) export const GridConfigurableProps = { configurableProps: { margin: createConfigurableDict('组件间隔', '10,10'), rowHeight: { type: 'number', ...createConfigurableDict('单位高', 20 + '') }, theme: { ...createConfigurableDict('主题', 'dark'), options: [ { label: '深色', value: 'dark' }, { label: '浅色', value: 'light' }, ] }, } }