全局快捷键优化
This commit is contained in:
parent
bd7f7b9948
commit
626eb622f8
|
@ -42,14 +42,14 @@ export default () => {
|
||||||
|
|
||||||
const copy = () => {
|
const copy = () => {
|
||||||
if(disableHotkeys.value) return
|
if(disableHotkeys.value) return
|
||||||
if(thumbnailsFocus.value) copySlide()
|
if(activeElementIdList.value.length) copyElement()
|
||||||
else if(activeElementIdList.value.length) copyElement()
|
else if(thumbnailsFocus.value) copySlide()
|
||||||
}
|
}
|
||||||
|
|
||||||
const cut = () => {
|
const cut = () => {
|
||||||
if(disableHotkeys.value) return
|
if(disableHotkeys.value) return
|
||||||
if(thumbnailsFocus.value) cutSlide()
|
if(activeElementIdList.value.length) cutElement()
|
||||||
else if(activeElementIdList.value.length) cutElement()
|
else if(thumbnailsFocus.value) cutSlide()
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectAll = () => {
|
const selectAll = () => {
|
||||||
|
@ -73,16 +73,14 @@ export default () => {
|
||||||
|
|
||||||
const remove = () => {
|
const remove = () => {
|
||||||
if(disableHotkeys.value) return
|
if(disableHotkeys.value) return
|
||||||
if(thumbnailsFocus.value) deleteSlide()
|
if(activeElementIdList.value.length) deleteElement()
|
||||||
else if(activeElementIdList.value.length) deleteElement()
|
else if(thumbnailsFocus.value) deleteSlide()
|
||||||
}
|
}
|
||||||
|
|
||||||
const move = (key: string) => {
|
const move = (key: string) => {
|
||||||
if(disableHotkeys.value) return
|
if(disableHotkeys.value) return
|
||||||
if(thumbnailsFocus.value && (key === KEYS.UP || key === KEYS.DOWN)) {
|
if(activeElementIdList.value.length) moveElement(key)
|
||||||
updateSlideIndex(key)
|
else if(key === KEYS.UP || key === KEYS.DOWN) updateSlideIndex(key)
|
||||||
}
|
|
||||||
else if(activeElementIdList.value.length) moveElement(key)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const create = () => {
|
const create = () => {
|
||||||
|
|
Loading…
Reference in New Issue