mirror of
https://github.com/MrXujiang/h5-Dooring.git
synced 2025-12-13 11:02:52 +00:00
🐛 修复左右拖拽问题,优化模块引用代码
This commit is contained in:
parent
625b43c595
commit
3d4c627f06
@ -164,11 +164,6 @@ const FormEditor = (props: FormEditorProps) => {
|
|||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
{/* <div style={{position: 'fixed', bottom: '0px'}}>
|
|
||||||
<Button danger style={{ width: '251px' }} block onClick={handleDel}>
|
|
||||||
删除
|
|
||||||
</Button>
|
|
||||||
</div> */}
|
|
||||||
</Form>
|
</Form>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
html, body, #root {
|
html, body, #root {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
width: 100vw;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
|||||||
@ -1,13 +1,11 @@
|
|||||||
import React, { useState, useEffect, useMemo, useCallback, useContext, useRef } from 'react';
|
import React, { useState, useEffect, useMemo, useCallback, useContext, useRef } from 'react';
|
||||||
import { Result, Tabs } from 'antd';
|
import { Result, Tabs, Button } from 'antd';
|
||||||
import {
|
import {
|
||||||
PieChartOutlined,
|
PieChartOutlined,
|
||||||
ExpandOutlined,
|
|
||||||
PlayCircleOutlined,
|
PlayCircleOutlined,
|
||||||
HighlightOutlined,
|
HighlightOutlined,
|
||||||
DoubleRightOutlined,
|
DoubleRightOutlined,
|
||||||
DoubleLeftOutlined,
|
DoubleLeftOutlined,
|
||||||
ReloadOutlined,
|
|
||||||
} 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';
|
||||||
@ -27,14 +25,11 @@ import graphTpl2 from 'components/BasicPcShop/VisualComponents/template';
|
|||||||
|
|
||||||
import schema1 from 'components/BasicShop/schema';
|
import schema1 from 'components/BasicShop/schema';
|
||||||
import schema2 from 'components/BasicPcShop/schema';
|
import schema2 from 'components/BasicPcShop/schema';
|
||||||
|
import { ActionCreators, StateWithHistory } from 'redux-undo';
|
||||||
import { ActionCreators } from 'redux-undo';
|
|
||||||
import { StateWithHistory } from 'redux-undo';
|
|
||||||
import styles from './index.less';
|
|
||||||
// import { useGetBall } from 'react-draggable-ball';
|
|
||||||
import { dooringContext } from '@/layouts';
|
import { dooringContext } from '@/layouts';
|
||||||
import { throttle } from '@/utils/tool';
|
import { throttle } from '@/utils/tool';
|
||||||
import { Button } from 'antd';
|
|
||||||
|
import styles from './index.less';
|
||||||
|
|
||||||
const { TabPane } = Tabs;
|
const { TabPane } = Tabs;
|
||||||
|
|
||||||
@ -220,11 +215,7 @@ const Container = (props: {
|
|||||||
}, [graphTpl, mediaTpl, template]);
|
}, [graphTpl, mediaTpl, template]);
|
||||||
|
|
||||||
const [dragstate, setDragState] = useState({ x: 0, y: 0 });
|
const [dragstate, setDragState] = useState({ x: 0, y: 0 });
|
||||||
// const [render] = useGetBall(setDragState, {
|
|
||||||
// innerStyle: { top: '10px', left: '10px', cursor: 'pointer' },
|
|
||||||
// ratioSpeed: { x: 1.2, y: 1.2 },
|
|
||||||
// intervalDelay: 5,
|
|
||||||
// });
|
|
||||||
const ref = useRef<HTMLDivElement>(null);
|
const ref = useRef<HTMLDivElement>(null);
|
||||||
const renderRight = useMemo(() => {
|
const renderRight = useMemo(() => {
|
||||||
if (context.theme === 'h5') {
|
if (context.theme === 'h5') {
|
||||||
@ -248,9 +239,6 @@ const Container = (props: {
|
|||||||
onDel={handleDel}
|
onDel={handleDel}
|
||||||
rightPannelRef={ref}
|
rightPannelRef={ref}
|
||||||
/>
|
/>
|
||||||
{/* <div className={styles.del}>
|
|
||||||
<Button block>删顶顶顶顶除</Button>
|
|
||||||
</div> */}
|
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<div style={{ paddingTop: '100px' }}>
|
<div style={{ paddingTop: '100px' }}>
|
||||||
@ -515,7 +503,6 @@ const Container = (props: {
|
|||||||
canvasId={canvasId}
|
canvasId={canvasId}
|
||||||
allType={allType}
|
allType={allType}
|
||||||
/>
|
/>
|
||||||
{/* TODO 暂时隐藏 */}
|
|
||||||
<CanvasControl
|
<CanvasControl
|
||||||
scaleNum={scaleNum}
|
scaleNum={scaleNum}
|
||||||
handleSlider={handleSlider}
|
handleSlider={handleSlider}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user