mirror of
https://github.com/MrXujiang/h5-Dooring.git
synced 2025-12-12 18:22:51 +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 { useMemo, memo, FC } from 'react';
|
||||||
import React 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) => {
|
const DynamicFunc = (type: string, componentsType: string) => {
|
||||||
return dynamic({
|
return dynamic({
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
import BasicSchema from './base/schema';
|
import BasicSchema from './base/schema';
|
||||||
import MediaSchema from './media/schema';
|
import MediaSchema from './media/schema';
|
||||||
import VisualSchema from './visual/schema';
|
import VisualSchema from './visual/schema';
|
||||||
import ShopSchema from './shop/schema';
|
import shopSchema from './ShopComponents/schema';
|
||||||
|
|
||||||
const schema = {
|
const schema = {
|
||||||
...BasicSchema,
|
...BasicSchema,
|
||||||
...MediaSchema,
|
...MediaSchema,
|
||||||
...VisualSchema,
|
...VisualSchema,
|
||||||
...ShopSchema,
|
...shopSchema,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default schema;
|
export default schema;
|
||||||
|
|||||||
@ -6,7 +6,6 @@ import {
|
|||||||
HighlightOutlined,
|
HighlightOutlined,
|
||||||
DoubleRightOutlined,
|
DoubleRightOutlined,
|
||||||
DoubleLeftOutlined,
|
DoubleLeftOutlined,
|
||||||
AppstoreOutlined,
|
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import { connect } from 'dva';
|
import { connect } from 'dva';
|
||||||
import HeaderComponent from './components/Header';
|
import HeaderComponent from './components/Header';
|
||||||
@ -20,7 +19,6 @@ import { FormRender } from '@/core';
|
|||||||
import template from '@/materials/base/template';
|
import template from '@/materials/base/template';
|
||||||
import mediaTpl from '@/materials/media/template';
|
import mediaTpl from '@/materials/media/template';
|
||||||
import graphTpl from '@/materials/visual/template';
|
import graphTpl from '@/materials/visual/template';
|
||||||
import shopTpl from '@/materials/shop/template';
|
|
||||||
|
|
||||||
import schemaH5 from '@/materials/schema';
|
import schemaH5 from '@/materials/schema';
|
||||||
import { ActionCreators, StateWithHistory } from 'redux-undo';
|
import { ActionCreators, StateWithHistory } from 'redux-undo';
|
||||||
@ -68,7 +66,6 @@ const Container = (props: {
|
|||||||
base: <HighlightOutlined />,
|
base: <HighlightOutlined />,
|
||||||
media: <PlayCircleOutlined />,
|
media: <PlayCircleOutlined />,
|
||||||
visible: <PieChartOutlined />,
|
visible: <PieChartOutlined />,
|
||||||
shop: <AppstoreOutlined />,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const generateHeader = useMemo(() => {
|
const generateHeader = useMemo(() => {
|
||||||
@ -157,11 +154,8 @@ const Container = (props: {
|
|||||||
graphTpl.forEach(v => {
|
graphTpl.forEach(v => {
|
||||||
arr.push(v.type);
|
arr.push(v.type);
|
||||||
});
|
});
|
||||||
shopTpl.forEach(v => {
|
|
||||||
arr.push(v.type);
|
|
||||||
});
|
|
||||||
return arr;
|
return arr;
|
||||||
}, [graphTpl, mediaTpl, template, shopTpl]);
|
}, [graphTpl, mediaTpl, template]);
|
||||||
|
|
||||||
const [dragstate, setDragState] = useState({ x: 0, y: 0 });
|
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('base', '')} key="1"></TabPane>
|
||||||
<TabPane tab={generateHeader('media', '')} key="2"></TabPane>
|
<TabPane tab={generateHeader('media', '')} key="2"></TabPane>
|
||||||
<TabPane tab={generateHeader('visible', '')} key="3"></TabPane>
|
<TabPane tab={generateHeader('visible', '')} key="3"></TabPane>
|
||||||
<TabPane tab={generateHeader('shop', '')} key="4"></TabPane>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -251,23 +244,10 @@ const Container = (props: {
|
|||||||
</TargetBox>
|
</TargetBox>
|
||||||
))}
|
))}
|
||||||
</TabPane>
|
</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 containerRef = useRef<HTMLDivElement>(null);
|
||||||
const [diffmove, setDiffMove] = useState({
|
const [diffmove, setDiffMove] = useState({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user