From 3c2830b12bc82cc2f554c0c0758174d55eabb9db Mon Sep 17 00:00:00 2001 From: pipipi-pikachu Date: Fri, 21 Feb 2025 21:44:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0AIPPT=E5=A4=A7?= =?UTF-8?q?=E7=BA=B2=E7=BC=96=E8=BE=91=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Input.vue | 2 + src/components/OutlineEditor.vue | 248 +++++++++++++++++++++++++++++-- src/views/Editor/AIPPTDialog.vue | 15 +- 3 files changed, 248 insertions(+), 17 deletions(-) diff --git a/src/components/Input.vue b/src/components/Input.vue index ec017524..cd7d43b4 100644 --- a/src/components/Input.vue +++ b/src/components/Input.vue @@ -22,6 +22,7 @@ @blur="$event => handleBlur($event)" @change="$event => emit('change', $event)" @keydown.enter="$event => emit('enter', $event)" + @keydown.backspace="$event => emit('backspace', $event)" /> @@ -51,6 +52,7 @@ const emit = defineEmits<{ (event: 'blur', payload: Event): void (event: 'focus', payload: Event): void (event: 'enter', payload: Event): void + (event: 'backspace', payload: Event): void }>() const focused = ref(false) diff --git a/src/components/OutlineEditor.vue b/src/components/OutlineEditor.vue index 63e5c78f..de7e9931 100644 --- a/src/components/OutlineEditor.vue +++ b/src/components/OutlineEditor.vue @@ -1,32 +1,64 @@ \ No newline at end of file diff --git a/src/views/Editor/AIPPTDialog.vue b/src/views/Editor/AIPPTDialog.vue index fd832621..dc333aec 100644 --- a/src/views/Editor/AIPPTDialog.vue +++ b/src/views/Editor/AIPPTDialog.vue @@ -3,7 +3,7 @@
AIPPT 从下方挑选合适的模板,开始生成PPT - 检查确认下方内容大纲,开始挑选模板 + 确认下方内容大纲(点击编辑内容,右键添加/删除大纲项),开始挑选模板 在下方输入您的PPT主题,并适当补充信息,如行业、岗位、学科、用途等
@@ -37,7 +37,10 @@
-
{{ outline }}
+
{{ outline }}
+
+ +
@@ -77,6 +80,7 @@ import Input from '@/components/Input.vue' import Button from '@/components/Button.vue' import Select from '@/components/Select.vue' import FullscreenSpin from '@/components/FullscreenSpin.vue' +import OutlineEditor from '@/components/OutlineEditor.vue' const mainStore = useMainStore() const { templates } = storeToRefs(useSlidesStore()) @@ -190,6 +194,13 @@ const createPPT = async () => { background-color: #f1f1f1; overflow: auto; } + .outline-view { + max-height: 450px; + padding: 10px; + margin-bottom: 15px; + background-color: #f1f1f1; + overflow: auto; + } .btns { display: flex; justify-content: center;