forked from zhongyidian/food-add-edu
refactor: CourseCanvas 使用默认画布尺寸,移除冗余 width/height 配置
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
ce9567d1da
commit
dc4197b207
2 files changed
-14
No files matched your search
@@ -1,6 +1,5 @@
|
|||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { Outlet } from "react-router-dom";
|
import { Outlet } from "react-router-dom";
|
||||||
import { appConfig } from "@/app.config";
|
|
||||||
import { ToastProvider, ToastViewport } from "@/components/ui/toast";
|
import { ToastProvider, ToastViewport } from "@/components/ui/toast";
|
||||||
import { CourseCanvas, useCourseCanvas } from "@/course-runtime/canvas";
|
import { CourseCanvas, useCourseCanvas } from "@/course-runtime/canvas";
|
||||||
import { OrientationGuard } from "@/course-runtime/orientation";
|
import { OrientationGuard } from "@/course-runtime/orientation";
|
||||||
@@ -65,8 +64,6 @@ function App() {
|
|||||||
<>
|
<>
|
||||||
<OrientationGuard />
|
<OrientationGuard />
|
||||||
<CourseCanvas
|
<CourseCanvas
|
||||||
width={appConfig.design.width}
|
|
||||||
height={appConfig.design.height}
|
|
||||||
className="bg-gray-900"
|
className="bg-gray-900"
|
||||||
canvasClassName="flex flex-col overflow-hidden bg-white"
|
canvasClassName="flex flex-col overflow-hidden bg-white"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -20,17 +20,6 @@ export const appConfig = {
|
|||||||
name: env?.VITE_COURSE_NAME ?? "标准课程页示例",
|
name: env?.VITE_COURSE_NAME ?? "标准课程页示例",
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 设计稿配置 */
|
|
||||||
design: {
|
|
||||||
width: 1920,
|
|
||||||
height: 1080,
|
|
||||||
},
|
|
||||||
|
|
||||||
/** 整体缩放配置 */
|
|
||||||
scale: {
|
|
||||||
max: 1,
|
|
||||||
},
|
|
||||||
|
|
||||||
/** 本地存储配置 */
|
/** 本地存储配置 */
|
||||||
storage: {
|
storage: {
|
||||||
prefix: "yiban-course-template",
|
prefix: "yiban-course-template",
|
||||||
|
|||||||
Reference in new issue
Block a user