mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
添加快捷键
This commit is contained in:
parent
7fa54bf83e
commit
5be5d3ce90
@ -46,7 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Drawer
|
<Drawer
|
||||||
width="300"
|
width="320"
|
||||||
placement="right"
|
placement="right"
|
||||||
:visible="hotkeyDrawerVisible"
|
:visible="hotkeyDrawerVisible"
|
||||||
@close="hotkeyDrawerVisible = false"
|
@close="hotkeyDrawerVisible = false"
|
||||||
@ -93,7 +93,7 @@ const hotkeys = [
|
|||||||
children: [
|
children: [
|
||||||
{ label: '开始放映幻灯片', value: 'Ctrl + F' },
|
{ label: '开始放映幻灯片', value: 'Ctrl + F' },
|
||||||
{ label: '切换上一页', value: '↑ / ←' },
|
{ label: '切换上一页', value: '↑ / ←' },
|
||||||
{ label: '切换下一页', value: '↓ / →' },
|
{ label: '切换下一页', value: '↓ / → / Enter / Space' },
|
||||||
{ label: '退出放映', value: 'ESC' },
|
{ label: '退出放映', value: 'ESC' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -154,6 +154,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const resetSlides = () => {
|
const resetSlides = () => {
|
||||||
|
store.commit(MutationTypes.SET_ACTIVE_ELEMENT_ID_LIST, [])
|
||||||
store.commit(MutationTypes.SET_SLIDES, [{
|
store.commit(MutationTypes.SET_SLIDES, [{
|
||||||
id: createRandomCode(),
|
id: createRandomCode(),
|
||||||
elements: [],
|
elements: [],
|
||||||
@ -222,7 +223,7 @@ export default defineComponent({
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.label {
|
.label {
|
||||||
width: 150px;
|
width: 140px;
|
||||||
|
|
||||||
@include ellipsis();
|
@include ellipsis();
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,12 @@ export default defineComponent({
|
|||||||
const keydownListener = (e: KeyboardEvent) => {
|
const keydownListener = (e: KeyboardEvent) => {
|
||||||
const key = e.key.toUpperCase()
|
const key = e.key.toUpperCase()
|
||||||
if(key === KEYS.UP || key === KEYS.LEFT) execPrev()
|
if(key === KEYS.UP || key === KEYS.LEFT) execPrev()
|
||||||
else if(key === KEYS.DOWN || key === KEYS.RIGHT) execNext()
|
else if(
|
||||||
|
key === KEYS.DOWN ||
|
||||||
|
key === KEYS.RIGHT ||
|
||||||
|
key === KEYS.SPACE ||
|
||||||
|
key === KEYS.ENTER
|
||||||
|
) execNext()
|
||||||
}
|
}
|
||||||
|
|
||||||
const mousewheelListener = throttle(function(e: WheelEvent) {
|
const mousewheelListener = throttle(function(e: WheelEvent) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user