From 50a83f32636d95e669796cd4f5925a72abc9121b Mon Sep 17 00:00:00 2001 From: iz <2131601562@qq.com> Date: Mon, 8 Jul 2024 14:17:10 +0000 Subject: [PATCH] fix bugs --- src/App.vue | 39 +++++++++++++++++++-------------------- src/module/chooser.vue | 4 ++-- src/module/tree.vue | 32 ++++++++++++++++++++++++++++++-- src/opener/vlite.vue | 14 +++++++++++--- src/opener/vplayer.vue | 40 +++++++++++++++++++++++++++++++++++----- src/utils.ts | 5 +++-- 6 files changed, 100 insertions(+), 34 deletions(-) diff --git a/src/App.vue b/src/App.vue index c235400..859cd86 100644 --- a/src/App.vue +++ b/src/App.vue @@ -252,10 +252,10 @@ >.right { position: relative; overflow: hidden; - } - > .mobile-tool{ - display: none; + > .mobile-tool{ + display: none; + } } > .left-overflow{ @@ -291,23 +291,22 @@ >.right { position: fixed; width: 100% !important; - } - - > .mobile-tool{ - position: absolute; - bottom: 40%; - right: 0; - transform: translateY(-50%); - - background-color: rgba(230, 222, 222, 0.6); - border-radius: .2rem 0 0 .2rem; - - > *{ - display: block; - padding: .25rem; - width: 1.2rem; - height: 1.2rem; - border-radius: .2rem; + > .mobile-tool{ + position: absolute; + bottom: 40%; + right: 0; + transform: translateY(-50%); + + background-color: rgba(230, 222, 222, 0.6); + border-radius: .2rem 0 0 .2rem; + + > *{ + display: block; + padding: .25rem; + width: 1.2rem; + height: 1.2rem; + border-radius: .2rem; + } } } } diff --git a/src/module/chooser.vue b/src/module/chooser.vue index 14c7084..c4519d3 100644 --- a/src/module/chooser.vue +++ b/src/module/chooser.vue @@ -127,8 +127,8 @@ border-radius: .25rem; overflow: hidden; - width: 60vw; - height: 60vh; + width: 100vw; + height: 80vh; max-width: 35rem; max-height: 25rem; background-color: #f3f3f3; diff --git a/src/module/tree.vue b/src/module/tree.vue index 76c4af9..af0661f 100644 --- a/src/module/tree.vue +++ b/src/module/tree.vue @@ -21,6 +21,14 @@ let marked = [] as Array; const markmap = ref>([]); + let touch = { + x: 0, + y: 0, + mx: 0, + my: 0, + time: 0 + } + export default { name: 'tree', props: { @@ -52,6 +60,24 @@ }; }, methods: { + touch_start(ev:TouchEvent){ + touch = { + x: ev.touches[0].clientX, + y: ev.touches[0].clientY, + mx: ev.touches[0].clientX, + my: ev.touches[0].clientY, + time: new Date().getTime() + }; + }, + touch_move(ev: TouchEvent){ + touch.mx = ev.touches[0].clientX, + touch.my = ev.touches[0].clientY; + }, + touch_end(){ + return Math.abs(touch.mx - touch.x) < 10 + && Math.abs(touch.my - touch.y) < 10 + && new Date().getTime() - touch.time <= 600; + }, desc(data:FileOrDir){ var tmp = data.dispName || data.name; if(data.ctime > 0) tmp += '\n创建日期: ' + (new Date(data.ctime).toDateString()); @@ -283,7 +309,8 @@
@@ -315,7 +342,8 @@
diff --git a/src/opener/vlite.vue b/src/opener/vlite.vue index 3f93bff..fb4e0d8 100644 --- a/src/opener/vlite.vue +++ b/src/opener/vlite.vue @@ -493,9 +493,13 @@ display: block; max-width: none !important; width: unset !important; + z-index: 0; > .cover{ - display: none; + position: fixed; + inset: 0; + z-index: -1; + filter: brightness(0.6); } > .time{ @@ -703,8 +707,12 @@ scroll-behavior: smooth; @media screen and (max-width: 30rem) { - width: 100%; - padding: 0 1rem; + width: unset;height: unset; + z-index: 0; + position: fixed; + margin: 0; + top: 0;left: .75rem; + right: .75rem;bottom: 7rem; } &::-webkit-scrollbar{ diff --git a/src/opener/vplayer.vue b/src/opener/vplayer.vue index 9fb920f..11a8ee3 100644 --- a/src/opener/vplayer.vue +++ b/src/opener/vplayer.vue @@ -28,7 +28,7 @@ // 总计时长 timetotal: '-:-', // 当前videoID - current: 0, + current: -1, // 是否循环播放 loop: false, // 播放列表 @@ -122,7 +122,7 @@ watch(() => config.current,function(n){ if(!video.value) return; // 最后一个了 - if(n >= config.playlist.length) return config.current = 1; + if(n >= config.playlist.length) return config.current = 0; // 第一个了 else if(n < 0) return config.current = config.playlist.length -1; // 刷新播放状态 @@ -261,7 +261,8 @@ config.playing ? video.value.pause() : video.value.play() else mouse(); - this.moved.lastClick = now; + this.moved.lastClick = now, + config.action = ''; } } @@ -415,7 +416,7 @@ @pointermove="mouse" @click="mouse" @keydown="keyev" > -