From d3b5039c7cd367ecb78799783221b103864f5c0b Mon Sep 17 00:00:00 2001 From: IITII Date: Sat, 7 Oct 2023 00:13:02 +0800 Subject: [PATCH] feat: highlight curr node --- README.md | 15 ++++---- src/components/pic_tools/ToolGroup.vue | 50 +++++++++++++++++++++++++- src/components/waterfall/PicDrawer.vue | 22 +++++++----- 3 files changed, 71 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 0dccd84..f5e34c4 100644 --- a/README.md +++ b/README.md @@ -55,17 +55,20 @@ ### 图片 -* ←: 打开侧栏 +* ←: 上一个 * →: 加载更多 -* ↑: 向上滚动 3/4 个屏幕. -* ↓: 向下滚动 3/4 个屏幕. +* ↑: 向上滚动 1 个屏幕. +* ↓: 向下滚动 1 个屏幕. --- -* a: 打开侧栏 +* a: 上一个 * d: 加载更多 -* w: 向上滚动 3/4 个屏幕. -* s: 向下滚动 3/4 个屏幕. +* w: 向上滚动 1 个屏幕. +* s: 向下滚动 1 个屏幕. +* r: 刷新页面 * q: 回到顶部 * e: 下一个 +* 0: 下一个 +* Delete: 删除当前文件夹 ### 视频 diff --git a/src/components/pic_tools/ToolGroup.vue b/src/components/pic_tools/ToolGroup.vue index 3e5050d..e9a1980 100644 --- a/src/components/pic_tools/ToolGroup.vue +++ b/src/components/pic_tools/ToolGroup.vue @@ -20,7 +20,7 @@ const keymap = { // leftDrawer: ['a','ArrowLeft'], loadMore: ['d','ArrowRight'], top: ['q'], - nextNode: ['e'], + nextNode: ['e', '0'], reloadPage: ['r'], btnClickDelDirs: ['Delete'], } @@ -184,6 +184,54 @@ export default { if (this.enableShortcut) { this.shortcutEle.addEventListener('keyup', this.shortcut) } + + // window.addEventListener('volumechange', e => { + // this.$q.notify({ + // message: `volumechange: ${e}`, + // color: 'warning', + // position: 'top', + // timeout: 1000, + // }) + // alert(`volumechange: ${e}`) + // }); + // if ('mediaSession' in navigator) { + // navigator.mediaSession.setActionHandler('volumeup', () => { + // this.$q.notify({ + // message: `volumeup`, + // color: 'warning', + // position: 'top', + // timeout: 1000, + // }) + // }); + // + // navigator.mediaSession.setActionHandler('volumedown', () => { + // this.$q.notify({ + // message: `volumedown`, + // color: 'warning', + // position: 'top', + // timeout: 1000, + // }) + // }); + // } + // document.addEventListener('volumeupbutton', e => { + // this.$log.debug('volumeupbutton', e) + // alert('volumeupbutton') + // this.scrollUp(e) + // }) + // document.addEventListener('volumedownbutton', e => { + // this.$log.debug('volumedownbutton', e) + // alert('volumedownbutton') + // this.scrollDown(e) + // }) + // document.addEventListener('volumechange', e => { + // this.$q.notify({ + // message: `volumechange: ${e}`, + // color: 'warning', + // position: 'top', + // timeout: 1000, + // }) + // alert(`volumechange: ${e}`) + // }) }, unmounted() { if (this.enableShortcut) { diff --git a/src/components/waterfall/PicDrawer.vue b/src/components/waterfall/PicDrawer.vue index 6814136..251bfd1 100644 --- a/src/components/waterfall/PicDrawer.vue +++ b/src/components/waterfall/PicDrawer.vue @@ -9,7 +9,7 @@
+ @input="inputListener" @focusin="filterFocusIn" @focusout="filterFocusOut"> @@ -17,18 +17,18 @@
+ :filter="tree.filter" :nodes="tree.nodes" + v-model:selected="tree.selectedNodeSync" node-key="nodeKey" @lazy-load="onLazyLoad" + @update:selected="update_selected">