mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
添加幻灯片重置
This commit is contained in:
parent
7195216348
commit
55a5c5fa16
@ -10,7 +10,7 @@
|
|||||||
<MenuItem @click="createSlide()">添加页面</MenuItem>
|
<MenuItem @click="createSlide()">添加页面</MenuItem>
|
||||||
<MenuItem @click="deleteSlide()">删除页面</MenuItem>
|
<MenuItem @click="deleteSlide()">删除页面</MenuItem>
|
||||||
<MenuItem @click="toggleGridLines()">{{ showGridLines ? '关闭网格线' : '打开网格线' }}</MenuItem>
|
<MenuItem @click="toggleGridLines()">{{ showGridLines ? '关闭网格线' : '打开网格线' }}</MenuItem>
|
||||||
<MenuItem>重置幻灯片</MenuItem>
|
<MenuItem @click="resetSlides()">重置幻灯片</MenuItem>
|
||||||
</Menu>
|
</Menu>
|
||||||
</template>
|
</template>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
@ -51,6 +51,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { computed, defineComponent } from 'vue'
|
import { computed, defineComponent } from 'vue'
|
||||||
import { MutationTypes, useStore } from '@/store'
|
import { MutationTypes, useStore } from '@/store'
|
||||||
|
import { createRandomCode } from '@/utils/common'
|
||||||
import useScreening from '@/hooks/useScreening'
|
import useScreening from '@/hooks/useScreening'
|
||||||
import useSlideHandler from '@/hooks/useSlideHandler'
|
import useSlideHandler from '@/hooks/useSlideHandler'
|
||||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||||
@ -69,6 +70,13 @@ export default defineComponent({
|
|||||||
store.commit(MutationTypes.SET_GRID_LINES_STATE, !showGridLines.value)
|
store.commit(MutationTypes.SET_GRID_LINES_STATE, !showGridLines.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const resetSlides = () => {
|
||||||
|
store.commit(MutationTypes.SET_SLIDES, [{
|
||||||
|
id: createRandomCode(),
|
||||||
|
elements: [],
|
||||||
|
}])
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
enterScreening,
|
enterScreening,
|
||||||
enterScreeningFromStart,
|
enterScreeningFromStart,
|
||||||
@ -78,6 +86,7 @@ export default defineComponent({
|
|||||||
undo,
|
undo,
|
||||||
toggleGridLines,
|
toggleGridLines,
|
||||||
showGridLines,
|
showGridLines,
|
||||||
|
resetSlides,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user