From 35ee7d69dd5438230543413d717ddf9b7546dd75 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Mon, 13 Apr 2026 04:59:40 -0600 Subject: [PATCH] fix --- src/components/editor/Preview.vue | 6 +++--- src/pages/TutorialEditor.vue | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/editor/Preview.vue b/src/components/editor/Preview.vue index 683ff31..8a8ac2c 100644 --- a/src/components/editor/Preview.vue +++ b/src/components/editor/Preview.vue @@ -91,12 +91,12 @@ const layoutConfig: Record< }, } const layoutIndex = ref(0) -const layoutIcon = computed(() => layoutConfig[layouts[layoutIndex.value]].icon) +const layoutIcon = computed(() => layoutConfig[layouts[layoutIndex.value]!].icon) const layoutLabel = computed( - () => layoutConfig[layouts[layoutIndex.value]].label, + () => layoutConfig[layouts[layoutIndex.value]!].label, ) const iframeWrapperStyle = computed(() => ({ - maxWidth: layoutConfig[layouts[layoutIndex.value]].width, + maxWidth: layoutConfig[layouts[layoutIndex.value]!].width, })) function cycleLayout() { layoutIndex.value = (layoutIndex.value + 1) % layouts.length diff --git a/src/pages/TutorialEditor.vue b/src/pages/TutorialEditor.vue index 8cd600a..ebe8805 100644 --- a/src/pages/TutorialEditor.vue +++ b/src/pages/TutorialEditor.vue @@ -104,7 +104,7 @@ async function getContent() { if (target) { show(display) } else if (list.value.length > 0) { - show(list.value[0].display) + show(list.value[0]!.display) } }