fix: resetSlides方法添加background并使用当前主题

This commit is contained in:
wcq 2021-04-14 18:58:42 +08:00
parent eafdb3ff4a
commit dc1ff2ea49

View File

@ -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])
}
/**