From 6b7da6136e34be74ebbaee51b9d4dde36c669661 Mon Sep 17 00:00:00 2001 From: mokinzhao Date: Thu, 30 Sep 2021 16:27:58 +0800 Subject: [PATCH] Revert "update: show shop component" This reverts commit 0718f048b5f3f5056607a60ce2ec0035c723009d. --- src/core/DynamicEngine.tsx | 2 +- .../CardLabel/index.less | 0 .../CardLabel/index.tsx | 0 .../CardLabel/schema.ts | 0 .../CardLabel/template.ts | 0 .../Coupons/index.less | 0 .../Coupons/index.tsx | 0 .../Coupons/schema.ts | 0 .../Coupons/template.ts | 0 .../{shop => ShopComponents}/List/index.less | 0 .../{shop => ShopComponents}/List/index.tsx | 0 .../{shop => ShopComponents}/List/schema.ts | 0 .../{shop => ShopComponents}/List/template.ts | 0 .../{shop => ShopComponents}/Tab/index.less | 0 .../{shop => ShopComponents}/Tab/index.tsx | 0 .../{shop => ShopComponents}/Tab/schema.ts | 0 .../{shop => ShopComponents}/Tab/template.ts | 0 .../ZhuanLan/index.less | 0 .../ZhuanLan/index.tsx | 0 .../ZhuanLan/schema.ts | 0 .../ZhuanLan/template.ts | 0 .../{shop => ShopComponents}/schema.ts | 0 .../{shop => ShopComponents}/template.ts | 0 src/materials/schema.ts | 4 ++-- src/pages/editor/Container.tsx | 24 ++----------------- 25 files changed, 5 insertions(+), 25 deletions(-) rename src/materials/{shop => ShopComponents}/CardLabel/index.less (100%) rename src/materials/{shop => ShopComponents}/CardLabel/index.tsx (100%) rename src/materials/{shop => ShopComponents}/CardLabel/schema.ts (100%) rename src/materials/{shop => ShopComponents}/CardLabel/template.ts (100%) rename src/materials/{shop => ShopComponents}/Coupons/index.less (100%) rename src/materials/{shop => ShopComponents}/Coupons/index.tsx (100%) rename src/materials/{shop => ShopComponents}/Coupons/schema.ts (100%) rename src/materials/{shop => ShopComponents}/Coupons/template.ts (100%) rename src/materials/{shop => ShopComponents}/List/index.less (100%) rename src/materials/{shop => ShopComponents}/List/index.tsx (100%) rename src/materials/{shop => ShopComponents}/List/schema.ts (100%) rename src/materials/{shop => ShopComponents}/List/template.ts (100%) rename src/materials/{shop => ShopComponents}/Tab/index.less (100%) rename src/materials/{shop => ShopComponents}/Tab/index.tsx (100%) rename src/materials/{shop => ShopComponents}/Tab/schema.ts (100%) rename src/materials/{shop => ShopComponents}/Tab/template.ts (100%) rename src/materials/{shop => ShopComponents}/ZhuanLan/index.less (100%) rename src/materials/{shop => ShopComponents}/ZhuanLan/index.tsx (100%) rename src/materials/{shop => ShopComponents}/ZhuanLan/schema.ts (100%) rename src/materials/{shop => ShopComponents}/ZhuanLan/template.ts (100%) rename src/materials/{shop => ShopComponents}/schema.ts (100%) rename src/materials/{shop => ShopComponents}/template.ts (100%) diff --git a/src/core/DynamicEngine.tsx b/src/core/DynamicEngine.tsx index d384514..d514fda 100644 --- a/src/core/DynamicEngine.tsx +++ b/src/core/DynamicEngine.tsx @@ -3,7 +3,7 @@ import Loading from '../components/LoadingCp'; import { useMemo, memo, FC } from 'react'; import React from 'react'; -export type componentsType = 'media' | 'base' | 'visible' | 'shop'; +export type componentsType = 'media' | 'base' | 'visible'; const DynamicFunc = (type: string, componentsType: string) => { return dynamic({ diff --git a/src/materials/shop/CardLabel/index.less b/src/materials/ShopComponents/CardLabel/index.less similarity index 100% rename from src/materials/shop/CardLabel/index.less rename to src/materials/ShopComponents/CardLabel/index.less diff --git a/src/materials/shop/CardLabel/index.tsx b/src/materials/ShopComponents/CardLabel/index.tsx similarity index 100% rename from src/materials/shop/CardLabel/index.tsx rename to src/materials/ShopComponents/CardLabel/index.tsx diff --git a/src/materials/shop/CardLabel/schema.ts b/src/materials/ShopComponents/CardLabel/schema.ts similarity index 100% rename from src/materials/shop/CardLabel/schema.ts rename to src/materials/ShopComponents/CardLabel/schema.ts diff --git a/src/materials/shop/CardLabel/template.ts b/src/materials/ShopComponents/CardLabel/template.ts similarity index 100% rename from src/materials/shop/CardLabel/template.ts rename to src/materials/ShopComponents/CardLabel/template.ts diff --git a/src/materials/shop/Coupons/index.less b/src/materials/ShopComponents/Coupons/index.less similarity index 100% rename from src/materials/shop/Coupons/index.less rename to src/materials/ShopComponents/Coupons/index.less diff --git a/src/materials/shop/Coupons/index.tsx b/src/materials/ShopComponents/Coupons/index.tsx similarity index 100% rename from src/materials/shop/Coupons/index.tsx rename to src/materials/ShopComponents/Coupons/index.tsx diff --git a/src/materials/shop/Coupons/schema.ts b/src/materials/ShopComponents/Coupons/schema.ts similarity index 100% rename from src/materials/shop/Coupons/schema.ts rename to src/materials/ShopComponents/Coupons/schema.ts diff --git a/src/materials/shop/Coupons/template.ts b/src/materials/ShopComponents/Coupons/template.ts similarity index 100% rename from src/materials/shop/Coupons/template.ts rename to src/materials/ShopComponents/Coupons/template.ts diff --git a/src/materials/shop/List/index.less b/src/materials/ShopComponents/List/index.less similarity index 100% rename from src/materials/shop/List/index.less rename to src/materials/ShopComponents/List/index.less diff --git a/src/materials/shop/List/index.tsx b/src/materials/ShopComponents/List/index.tsx similarity index 100% rename from src/materials/shop/List/index.tsx rename to src/materials/ShopComponents/List/index.tsx diff --git a/src/materials/shop/List/schema.ts b/src/materials/ShopComponents/List/schema.ts similarity index 100% rename from src/materials/shop/List/schema.ts rename to src/materials/ShopComponents/List/schema.ts diff --git a/src/materials/shop/List/template.ts b/src/materials/ShopComponents/List/template.ts similarity index 100% rename from src/materials/shop/List/template.ts rename to src/materials/ShopComponents/List/template.ts diff --git a/src/materials/shop/Tab/index.less b/src/materials/ShopComponents/Tab/index.less similarity index 100% rename from src/materials/shop/Tab/index.less rename to src/materials/ShopComponents/Tab/index.less diff --git a/src/materials/shop/Tab/index.tsx b/src/materials/ShopComponents/Tab/index.tsx similarity index 100% rename from src/materials/shop/Tab/index.tsx rename to src/materials/ShopComponents/Tab/index.tsx diff --git a/src/materials/shop/Tab/schema.ts b/src/materials/ShopComponents/Tab/schema.ts similarity index 100% rename from src/materials/shop/Tab/schema.ts rename to src/materials/ShopComponents/Tab/schema.ts diff --git a/src/materials/shop/Tab/template.ts b/src/materials/ShopComponents/Tab/template.ts similarity index 100% rename from src/materials/shop/Tab/template.ts rename to src/materials/ShopComponents/Tab/template.ts diff --git a/src/materials/shop/ZhuanLan/index.less b/src/materials/ShopComponents/ZhuanLan/index.less similarity index 100% rename from src/materials/shop/ZhuanLan/index.less rename to src/materials/ShopComponents/ZhuanLan/index.less diff --git a/src/materials/shop/ZhuanLan/index.tsx b/src/materials/ShopComponents/ZhuanLan/index.tsx similarity index 100% rename from src/materials/shop/ZhuanLan/index.tsx rename to src/materials/ShopComponents/ZhuanLan/index.tsx diff --git a/src/materials/shop/ZhuanLan/schema.ts b/src/materials/ShopComponents/ZhuanLan/schema.ts similarity index 100% rename from src/materials/shop/ZhuanLan/schema.ts rename to src/materials/ShopComponents/ZhuanLan/schema.ts diff --git a/src/materials/shop/ZhuanLan/template.ts b/src/materials/ShopComponents/ZhuanLan/template.ts similarity index 100% rename from src/materials/shop/ZhuanLan/template.ts rename to src/materials/ShopComponents/ZhuanLan/template.ts diff --git a/src/materials/shop/schema.ts b/src/materials/ShopComponents/schema.ts similarity index 100% rename from src/materials/shop/schema.ts rename to src/materials/ShopComponents/schema.ts diff --git a/src/materials/shop/template.ts b/src/materials/ShopComponents/template.ts similarity index 100% rename from src/materials/shop/template.ts rename to src/materials/ShopComponents/template.ts diff --git a/src/materials/schema.ts b/src/materials/schema.ts index 78ce106..c8da183 100644 --- a/src/materials/schema.ts +++ b/src/materials/schema.ts @@ -1,13 +1,13 @@ import BasicSchema from './base/schema'; import MediaSchema from './media/schema'; import VisualSchema from './visual/schema'; -import ShopSchema from './shop/schema'; +import shopSchema from './ShopComponents/schema'; const schema = { ...BasicSchema, ...MediaSchema, ...VisualSchema, - ...ShopSchema, + ...shopSchema, }; export default schema; diff --git a/src/pages/editor/Container.tsx b/src/pages/editor/Container.tsx index aa1da5a..05c5a85 100644 --- a/src/pages/editor/Container.tsx +++ b/src/pages/editor/Container.tsx @@ -6,7 +6,6 @@ import { HighlightOutlined, DoubleRightOutlined, DoubleLeftOutlined, - AppstoreOutlined, } from '@ant-design/icons'; import { connect } from 'dva'; import HeaderComponent from './components/Header'; @@ -20,7 +19,6 @@ import { FormRender } from '@/core'; import template from '@/materials/base/template'; import mediaTpl from '@/materials/media/template'; import graphTpl from '@/materials/visual/template'; -import shopTpl from '@/materials/shop/template'; import schemaH5 from '@/materials/schema'; import { ActionCreators, StateWithHistory } from 'redux-undo'; @@ -68,7 +66,6 @@ const Container = (props: { base: , media: , visible: , - shop: , }; const generateHeader = useMemo(() => { @@ -157,11 +154,8 @@ const Container = (props: { graphTpl.forEach(v => { arr.push(v.type); }); - shopTpl.forEach(v => { - arr.push(v.type); - }); return arr; - }, [graphTpl, mediaTpl, template, shopTpl]); + }, [graphTpl, mediaTpl, template]); const [dragstate, setDragState] = useState({ x: 0, y: 0 }); @@ -204,7 +198,6 @@ const Container = (props: { - ); } else { @@ -251,23 +244,10 @@ const Container = (props: { ))} - -
营销组件
- {shopTpl.map((value, i) => ( - - - - ))} -
); } - }, [canvasId, collapsed, generateHeader, graphTpl, mediaTpl, schemaH5, template, shopTpl]); + }, [canvasId, collapsed, generateHeader, graphTpl, mediaTpl, schemaH5, template]); const containerRef = useRef(null); const [diffmove, setDiffMove] = useState({