From 803fd6985010a1d5150f15f0fbdf5c2de44a435c Mon Sep 17 00:00:00 2001 From: Miao_Spring <539943419@qq.com> Date: Wed, 28 Aug 2024 21:13:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96PDF=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E6=94=BE=E7=BC=A9=E6=93=8D=E4=BD=9C=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 3 +- .../miaoDirectory/miaoDirectoryItem.vue | 10 +++-- src/views/miaoDirectory.vue | 1 + src/views/miaoPDF.vue | 38 ++++++++----------- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/App.vue b/src/App.vue index 256b959..fffe030 100644 --- a/src/App.vue +++ b/src/App.vue @@ -120,6 +120,7 @@ onMounted(() => { :key="view.uid"> {{ view.title.length > 5 && 0 @@ -332,7 +333,7 @@ $tag-width: 170px; .view-container-item { flex: 1; height: 100%; - min-width: 0; + min-width: 200px; } &::-webkit-scrollbar { diff --git a/src/components/miaoDirectory/miaoDirectoryItem.vue b/src/components/miaoDirectory/miaoDirectoryItem.vue index df7bef5..9882f4d 100644 --- a/src/components/miaoDirectory/miaoDirectoryItem.vue +++ b/src/components/miaoDirectory/miaoDirectoryItem.vue @@ -7,7 +7,7 @@
- {{ name }} + {{ name }}
{{ time }} @@ -249,6 +249,7 @@ onMounted(() => { .item-main { position: relative; width: 100%; + min-width: 200px; height: 95%; background-color: rgb(255, 255, 255); border-radius: 7px; @@ -258,14 +259,16 @@ onMounted(() => { .item-main-front { height: 100%; - width: 10px; + min-width: 10px; border-radius: 7px 0 0 7px; background-color: rgb(0, 0, 0); } .item-main-icon { + min-width: 30px; margin-left: 10px; - height: 80%; + height: 30px; + width: 30px; color: #00403e; transition: color 0.15s ease-out; } @@ -273,6 +276,7 @@ onMounted(() => { .item-main-info { margin-left: 10px; height: 100%; + width: calc( 100% - 10px ); display: flex; flex-direction: column; diff --git a/src/views/miaoDirectory.vue b/src/views/miaoDirectory.vue index 5ffc7cb..215ca8f 100644 --- a/src/views/miaoDirectory.vue +++ b/src/views/miaoDirectory.vue @@ -457,6 +457,7 @@ $bottom-bar-height: 60px; display: flex; flex-direction: column; overflow: hidden; + min-width: 170px; .container-top { height: $top-height; diff --git a/src/views/miaoPDF.vue b/src/views/miaoPDF.vue index 62dda0d..8c03d66 100644 --- a/src/views/miaoPDF.vue +++ b/src/views/miaoPDF.vue @@ -8,9 +8,13 @@
++
-
+
+
+
+
-
加载中,加载进度:{{ loadingPercent === -1 ? '缓存中' : `${canvasList.length}/${pdfPageCount}` }}
+
{{ loadingPercent === -1 ? '缓存中' : + `渲染进度:${canvasList.length}/${pdfPageCount}` }}
@@ -44,9 +48,9 @@ const handleZoom = (index?: number) => { const handleShrink = (index?: number) => { const _index = index ?? 1 - if (pdfMargin.value - 10 * _index <= 0) { - return pdfMargin.value = 0 - } + // if (pdfMargin.value - 10 * _index <= 0) { + // return pdfMargin.value = 0 + // } pdfMargin.value -= 10 * _index } @@ -55,7 +59,7 @@ const handleResetMargin = () => { } const loadingPercent = computed(() => { - if(pdfPageCount.value === -1) { + if (pdfPageCount.value === -1) { return -1 } return canvasList.length / pdfPageCount.value @@ -100,7 +104,7 @@ onMounted(async () => { width: 100%; height: 100%; background-color: rgb(53, 53, 53); - overflow-y: hidden; + overflow: hidden; display: flex; flex-direction: column; align-items: center; @@ -136,22 +140,12 @@ onMounted(async () => { .miao-container-pdf { min-width: 0; - max-width: 100%; - max-height: 100%; + width: 100%; display: flex; flex-direction: column; - - .page { + .miao-container-pdf-content { display: flex; - justify-content: center; - align-items: center; - transform: scale(0.5); - } - - canvas { - width: 100%; - height: 100%; - border-bottom: 1px solid black; + flex-direction: column; } } @@ -161,12 +155,12 @@ onMounted(async () => { background-color: aliceblue; border: 1px solid black; height: 40px; - width: 400px; + width: 200px; border-radius: 10px; display: flex; justify-content: center; align-items: center; - font-size: 20px; + font-size: 15px; letter-spacing: 5px; user-select: none; }