Skip to content

Commit

Permalink
Merge pull request MrXujiang#94 from mokinzhao/master
Browse files Browse the repository at this point in the history
refactor:optmize core structure
  • Loading branch information
MrXujiang authored Mar 27, 2021
2 parents 7d8ea3c + 72d5b88 commit 8360916
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 12 deletions.
4 changes: 4 additions & 0 deletions src/core/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import DynamicEngine from './DynamicEngine';
import ViewRender from './renderer/ViewRender';
import FormRender from './renderer/FormRender';
export { DynamicEngine, ViewRender, FormRender };
18 changes: 9 additions & 9 deletions src/core/FormRender.tsx → src/core/renderer/FormRender.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React, { memo, RefObject, useEffect } from 'react';
import { Form, Select, InputNumber, Input, Switch, Radio } from 'antd';
import Upload from './FormComponents/Upload';
import DataList from './FormComponents/DataList';
import MutiText from './FormComponents/MutiText';
import Color from './FormComponents/Color';
import CardPicker from './FormComponents/CardPicker';
import Table from './FormComponents/Table';
import Pos from './FormComponents/Pos';
import Upload from '../FormComponents/Upload';
import DataList from '../FormComponents/DataList';
import MutiText from '../FormComponents/MutiText';
import Color from '../FormComponents/Color';
import CardPicker from '../FormComponents/CardPicker';
import Table from '../FormComponents/Table';
import Pos from '../FormComponents/Pos';
import { Store } from 'antd/lib/form/interface';
import RichText from './FormComponents/XEditor';
import FormItems from './FormComponents/FormItems';
import RichText from '../FormComponents/XEditor';
import FormItems from '../FormComponents/FormItems';
const normFile = (e: any) => {
console.log('Upload event:', e);
if (Array.isArray(e)) {
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/pages/editor/Container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import SourceBox from './SourceBox';
import TargetBox from './TargetBox';
import Calibration from 'components/Calibration';
import DynamicEngine, { componentsType } from '@/core/DynamicEngine';
import FormRender from '@/core/FormRender';
import { FormRender } from '@/core';

import template from 'components/BasicShop/BasicComponents/template';
import mediaTpl from 'components/BasicShop/MediaComponents/template';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/editor/SourceBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useDrop } from 'react-dnd';
import Draggable, { DraggableData, DraggableEvent } from 'react-draggable';
import { ItemCallback } from 'react-grid-layout';
import { connect } from 'dva';
import ViewRender from '@/core/ViewRender';
import { ViewRender } from '@/core';
import styles from './index.less';
import { uuid } from '@/utils/tool';
import { Dispatch } from 'umi';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/editor/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { CSSProperties, memo, useEffect, useMemo, useRef, useState } from 'react';
import ViewRender from '@/core/ViewRender';
import { ViewRender } from '@/core';
import domtoimage from 'dom-to-image';
import req from '@/utils/req';
import { useGetScrollBarWidth } from '@/utils/tool';
Expand Down

0 comments on commit 8360916

Please sign in to comment.