From 52a3005d7e4acdc28ea76feba45faff6b1740db7 Mon Sep 17 00:00:00 2001 From: ZiuChen <457353192@qq.com> Date: Sun, 4 Sep 2022 22:13:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4=E4=BE=A7=E6=A0=8F?= =?UTF-8?q?=E5=85=A8=E9=83=A8=E6=95=B0=E6=8D=AE=E6=A0=B7=E5=BC=8F=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=8D=E9=9A=90=E8=97=8F=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E5=A4=8D=E5=88=B6=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/preload.js | 4 ++-- src/cpns/ClipFullData.vue | 3 ++- src/cpns/ClipItemList.vue | 2 +- src/style/cpns/clip-full-data.less | 15 ++++++++++----- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/public/preload.js b/public/preload.js index 76e5dc5..c2d7f79 100644 --- a/public/preload.js +++ b/public/preload.js @@ -161,7 +161,7 @@ const watchClipboard = async (db, fn) => { }, 250) } -const copy = (item) => { +const copy = (item, isHideMainWindow = true) => { switch (item.type) { case 'text': utools.copyText(item.data) @@ -174,7 +174,7 @@ const copy = (item) => { utools.copyFile(paths) break } - utools.hideMainWindow() + isHideMainWindow && utools.hideMainWindow() } const paste = () => { diff --git a/src/cpns/ClipFullData.vue b/src/cpns/ClipFullData.vue index 7c109e6..fd89f6d 100644 --- a/src/cpns/ClipFullData.vue +++ b/src/cpns/ClipFullData.vue @@ -48,10 +48,11 @@ onMounted(() => { @import '../style'; .fade-enter-active, .fade-leave-active { - transition: opacity 0.15s ease; + transition: all 0.15s ease; } .fade-enter-from, .fade-leave-to { + width: 0px; opacity: 0; } diff --git a/src/cpns/ClipItemList.vue b/src/cpns/ClipItemList.vue index c5a18f2..e05ea7e 100644 --- a/src/cpns/ClipItemList.vue +++ b/src/cpns/ClipItemList.vue @@ -112,7 +112,7 @@ const operation = [ const handleOperateClick = ({ id, item }) => { switch (id) { case 'copy': - window.copy(item) + window.copy(item, false) break case 'view': emit('onDataChange', item) diff --git a/src/style/cpns/clip-full-data.less b/src/style/cpns/clip-full-data.less index d7eb858..e5a5e8f 100644 --- a/src/style/cpns/clip-full-data.less +++ b/src/style/cpns/clip-full-data.less @@ -2,14 +2,19 @@ z-index: 9999999999; position: fixed; top: 0; - height: 100%; + height: -webkit-fill-available; width: 70%; color: @text-color; background: @bg-color; - padding: 0px 20px 0px 20px; + margin: 0px 0px; + padding: 10px 20px; overflow-y: scroll; word-break: break-all; white-space: pre-wrap; + div { + background-color: @text-bg-color; + padding: 10px; + } &::-webkit-scrollbar { width: 10px; height: 10px; @@ -25,9 +30,9 @@ &::-webkit-scrollbar-thumb { background: @text-color-lighter; border-radius: 5px; - } - &::-webkit-scrollbar-thumb:hover { - background: @text-color; + &:hover { + background: @text-color; + } } } .clip-overlay {