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 {