diff --git a/src/hooks/useSlideHandler.ts b/src/hooks/useSlideHandler.ts index 7c8e6421..9ba258b0 100644 --- a/src/hooks/useSlideHandler.ts +++ b/src/hooks/useSlideHandler.ts @@ -25,12 +25,17 @@ export default () => { // 重置幻灯片 const resetSlides = () => { + const emptySlide = { + id: createRandomCode(8), + elements: [], + background: { + type: 'solid', + color: theme.value.backgroundColor, + }, + } store.commit(MutationTypes.UPDATE_SLIDE_INDEX, 0) store.commit(MutationTypes.SET_ACTIVE_ELEMENT_ID_LIST, []) - store.commit(MutationTypes.SET_SLIDES, [{ - id: createRandomCode(), - elements: [], - }]) + store.commit(MutationTypes.SET_SLIDES, [emptySlide]) } /**