From 3dd16de66a17a18f10f4beb3b1438cddac6f77ec Mon Sep 17 00:00:00 2001 From: Zhilin Liu Date: Sat, 13 Jan 2024 21:12:23 +0800 Subject: [PATCH] feat: insert slide from ToolBar (#58) --- src/Kernel/SlideManager.ts | 1 + src/UserInterface/ToolBar/components/Home/Slides.vue | 9 +++++---- .../ToolBar/components/Insert/Slides.vue | 11 ++++------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/Kernel/SlideManager.ts b/src/Kernel/SlideManager.ts index 5613de4..966e055 100644 --- a/src/Kernel/SlideManager.ts +++ b/src/Kernel/SlideManager.ts @@ -27,6 +27,7 @@ export class SlideManager { insertSlide(index: number = this._currentIndex + 1) { this._slides.splice(index, 0, new Slide()) + this.changeSlide(index) this.events.update.emit() } diff --git a/src/UserInterface/ToolBar/components/Home/Slides.vue b/src/UserInterface/ToolBar/components/Home/Slides.vue index 435a401..2c6c1da 100644 --- a/src/UserInterface/ToolBar/components/Home/Slides.vue +++ b/src/UserInterface/ToolBar/components/Home/Slides.vue @@ -1,19 +1,20 @@ diff --git a/src/UserInterface/ToolBar/components/Insert/Slides.vue b/src/UserInterface/ToolBar/components/Insert/Slides.vue index 20ebd7e..c97ef18 100644 --- a/src/UserInterface/ToolBar/components/Insert/Slides.vue +++ b/src/UserInterface/ToolBar/components/Insert/Slides.vue @@ -1,17 +1,14 @@