mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
Merge pull request #18 from Jibacat/fix_reset
fix: resetSlides方法添加background并使用当前主题
This commit is contained in:
commit
09f498ce24
@ -25,12 +25,17 @@ export default () => {
|
||||
|
||||
// 重置幻灯片
|
||||
const resetSlides = () => {
|
||||
store.commit(MutationTypes.UPDATE_SLIDE_INDEX, 0)
|
||||
store.commit(MutationTypes.SET_ACTIVE_ELEMENT_ID_LIST, [])
|
||||
store.commit(MutationTypes.SET_SLIDES, [{
|
||||
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, [emptySlide])
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user