UNPKG

grid-component-editor

Version:

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

45 lines (37 loc) 1.16 kB
import { ReducerType as RT, EditorComponent, RegisterComType } from '../types' // namespace export const GE = 'GE' export const CountKey = 'gcount' export const StorageKey = { recent: GE + 'recent' } export const ReducerKey: Record<RT, RT> = { INIT: 'INIT', COMPONENT: 'COMPONENT', U_COM: 'U_COM',// 'UPDATE_COMPONENT', U_COM_PROP: 'U_COM_PROP', //'UPDATE_COMPONENT_PROP', DELETE_COMPONENT: 'DELETE_COMPONENT', CUR_FOCUS_INDEX: 'CUR_FOCUS_INDEX', GLOBALCONFIG: 'GLOBALCONFIG', FULL_UPDATE: 'FULL_UPDATE', // this is full setState to use carefully FETCH_DATA: 'FETCH_DATA', // FETCH_DATAS: 'FETCH_DATAS', // FETCH_OPTION: 'FETCH_OPTION', // RECALL: 'RECALL', // RESET: 'RESET', // } export const _countIncrement = (com: EditorComponent) => { // 组件有变更 计数自增 com.props[CountKey]++ } const display = { gdata: null, gloading: null, [CountKey]: 0 //记录组件的变更 优化渲染 } export const InjectToProps: Record<RegisterComType, any> = { display, control: { filter: {}, ...display }, }