fix:解决拖拽问题
This commit is contained in:
1 parent
ce06ad0214
commit
6367014e1f
34 files changed
+1712
-397
No files matched your search
+25
-3
@@ -1,8 +1,30 @@
|
||||
import { RouterProvider } from 'react-router-dom';
|
||||
import router from './router/router';
|
||||
import { RouterProvider } from "react-router-dom";
|
||||
import router from "./router";
|
||||
import { usePageScale } from "./hooks/usePageScale";
|
||||
import { ScaleProvider } from "./contexts/ScaleContext";
|
||||
|
||||
function App() {
|
||||
return <RouterProvider router={router} />;
|
||||
const { scaleStyle, scale, offsetX, offsetY, DESIGN_WIDTH, DESIGN_HEIGHT } =
|
||||
usePageScale();
|
||||
|
||||
return (
|
||||
<ScaleProvider
|
||||
value={{ scale, offsetX, offsetY, DESIGN_WIDTH, DESIGN_HEIGHT }}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
position: "relative",
|
||||
width: "100vw",
|
||||
height: "100vh",
|
||||
overflow: "hidden",
|
||||
}}
|
||||
>
|
||||
<div style={scaleStyle}>
|
||||
<RouterProvider router={router} />
|
||||
</div>
|
||||
</div>
|
||||
</ScaleProvider>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
Reference in new issue
Block a user