mirror of
https://github.com/MrXujiang/h5-Dooring.git
synced 2025-12-11 01:12:49 +00:00
Revert "update: show shop component"
This reverts commit 0718f048b5f3f5056607a60ce2ec0035c723009d.
This commit is contained in:
parent
0718f048b5
commit
03fa644db5
@ -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({
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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: <HighlightOutlined />,
|
||||
media: <PlayCircleOutlined />,
|
||||
visible: <PieChartOutlined />,
|
||||
shop: <AppstoreOutlined />,
|
||||
};
|
||||
|
||||
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: {
|
||||
<TabPane tab={generateHeader('base', '')} key="1"></TabPane>
|
||||
<TabPane tab={generateHeader('media', '')} key="2"></TabPane>
|
||||
<TabPane tab={generateHeader('visible', '')} key="3"></TabPane>
|
||||
<TabPane tab={generateHeader('shop', '')} key="4"></TabPane>
|
||||
</>
|
||||
);
|
||||
} else {
|
||||
@ -251,23 +244,10 @@ const Container = (props: {
|
||||
</TargetBox>
|
||||
))}
|
||||
</TabPane>
|
||||
<TabPane tab={generateHeader('shop', '')} key="4">
|
||||
<div className={styles.ctitle}>营销组件</div>
|
||||
{shopTpl.map((value, i) => (
|
||||
<TargetBox item={value} key={i} canvasId={canvasId}>
|
||||
<DynamicEngine
|
||||
{...value}
|
||||
config={schemaH5[value.type as keyof typeof schemaH5].config}
|
||||
componentsType={'shop' as componentsType}
|
||||
isTpl={true}
|
||||
/>
|
||||
</TargetBox>
|
||||
))}
|
||||
</TabPane>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}, [canvasId, collapsed, generateHeader, graphTpl, mediaTpl, schemaH5, template, shopTpl]);
|
||||
}, [canvasId, collapsed, generateHeader, graphTpl, mediaTpl, schemaH5, template]);
|
||||
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
const [diffmove, setDiffMove] = useState({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user